Churches could lose their tax-exempt status with the IRS if they refuse to recognize the Supreme Court’s ruling Friday legalizing gay marriage in all 50 states, Supreme Court Chief Justice John Roberts warned in his dissenting opinion.

He cited a comment made months ago by the U.S. government’s top lawyer on the same-sex marriage case.

“Hard questions arise when people of faith exercise religion in ways that may be seen to conflict with the new right to same-sex marriage — when, for example, a religious college provides married student housing only to opposite-sex married couples, or a religious adoption agency declines to place children with same-sex married couples,” Roberts wrote.

“Indeed, the Solicitor General candidly acknowledged that the tax exemptions of some religious institutions would be in question if they opposed same-sex marriage. See Tr. of Oral Arg. on Question 1, at 36–38. There is little doubt that these and similar questions will soon be before this Court. Unfortunately, people of faith can take no comfort in the treatment they receive from the majority today.”

During oral arguments in April, Justice Samuel Alito asked Solicitor General Donald Verrilli whether schools that teach that marriage is between one man and one woman would face treatment similar to pro-segregation schools during the civil rights era.

“It’s certainly going to be an issue,” Verrilli replied. “I don’t deny that.”

Follow Howley on Twitter