The Supreme Court, in a 5-4 ruling Tuesday, struck down a California law mandating that pro-life pregnancy centers advertise where clients may get an abortion.

The decision, supporters said, confirmed that government can’t compel citizens to promote messages they don’t agree with.

“No one should be forced by the government to express a message that violates their convictions, especially on deeply divisive subjects such as abortion,” Michael Farris, who argued the case at the Supreme Court, said in a formal statement following the decision.

“In this case, the government used its power to force pro-life pregnancy centers to provide free advertising for abortion,” said Farris, who is president, CEO, and general counsel of the Christian legal group Alliance Defending Freedom. “The Supreme Court said that the government can’t do that, and that it must respect pro-life beliefs.”

In the majority opinion, Justice Clarence Thomas wrote that the state law “unduly burdens protected speech,” and in a concurring opinion, Justice Anthony Kennedy said the government can’t compel citizens to promote a message they don’t agree with.

“Governments must not be allowed to force persons to express a message contrary to their deepest convictions,” Kennedy wrote.  “Freedom of speech secures freedom of thought and belief. This law imperils those liberties.”

Thomas and Kennedy were joined in the majority by Chief Justice John Roberts and Justices Samuel Alito and Neil Gorsuch. Roberts, Alito, and Gorsuch also joined in Kennedy’s concurring opinion.

Dissenting were Justices Stephen Breyer (who wrote that opinion), Ruth Bader Ginsburg, Sonia Sotomayor, and Elena Kagan.

The case, National Institute of Family and Life Advocates (NIFLA) v. Becerra, challenged a 2015 California state law that required “licensed medical centers that offer free, pro-life help to pregnant women to post a disclosure saying that California provides free or low-cost abortion and contraception services,” according to Alliance Defending Freedom.

The National Institute of Family and Life Advocates provides legal counsel to more than 1,400 pro-life pregnancy centers across the country.

The California law also required unlicensed pregnancy centers, which offer adoption referrals and nonmedical resources other than abortions to expectant mothers, to include “large disclosures about their nonmedical status” in their advertising.

In a previous interview with The Daily Signal, Christine Vatuone, CEO and president of Informed Choices, a pregnancy resource center and medical clinic in Gilroy, California, said her center would have to close its doors if the Supreme Court upheld the California law.

>>> Supreme Court Ruling Could Mean Life or Death for Her Pro-Life Pregnancy Center

In a statement provided to The Daily Signal, Vatuone praised the high court for protecting free speech:

On behalf of Informed Choices and all pro-life pregnancy centers who serve women throughout California and our nation, I want to thank the Supreme Court for protecting our freedom by holding we are likely to succeed on our claim that AB 775 is unconstitutional today.

Melanie Israel, a research associate in the DeVos Center for Religion and Civil Society at The Heritage Foundation, welcomed the court’s ruling.

“Today the Supreme Court struck a blow for free speech and rightly recognized that pro-life pregnancy centers shouldn’t be forced to contradict their mission of providing compassionate alternatives to abortion,” Israel said, adding:

Whether or not you agree with the pro-life mission of these pregnancy centers, all Americans should be wary of government compelling dissenting voices to communicate a message that directly contradicts and undermines their very reason for existing.

In a statement posted on Twitter, the National Abortion and Reproductive Rights Action League criticized the decision, saying that the Supreme Court “ruled that unlicensed fake women’s health centers are free to dress up as doctors & deliberately lie to women about their #reprohealth.”

But Tony Perkins, president of the Family Research Council, said in a written statement that the decision is common sense.

“The U.S. Supreme Court has ruled the state of California was clearly in the wrong in this case and all Americans, whether pro-life or not, should be relieved with the Supreme Court’s decision,” Perkins said. “What if the government made a vegan grocer post ads for the local butcher shop? Everyone would agree that that’s not fair. This case is no different and thankfully, the court recognized that fact.”