Conservative religious schools all over the country forbid same-sex relationships, from dating to couples living in married-student housing, and they fear they will soon be forced to make a wrenching choice. If the Supreme Court this month finds a constitutional right to same-sex marriage, the schools say they will either have to abandon their policies that prohibit gay relationships or eventually risk losing their tax-exempt status.

The religious schools are concerned that if they continue to bar gay relationships, the Internal Revenue Service could take away their tax-exempt status as a violation of a “fundamental national public policy” under the reasoning of a 1983 Supreme Court decision that allowed the agency to revoke the tax-exempt status of schools that banned interracial relationships.

In a recent letter to congressional leaders, officials from more than 70 schools, from Catholic high schools to evangelical colleges, said that a Supreme Court ruling approving same-sex marriage would put at risk all schools “adhering to traditional religious and moral values.”

“I am concerned, and I think I’d be remiss, if not naive, to be otherwise,” said Everett Piper, president of Oklahoma Wesleyan University, in Bartlesville, Oklahoma. “This is not alarmist thinking. This is rational listening.”

The spreading anxiety among conservatives — including Sen. Rand Paul, R-Ky., who mentioned the issue in an interview on “The Daily Show” last month — hints at the potential effect of a Supreme Court decision backing the right to same-sex marriage, especially for religious institutions that forbid sexual intimacy outside heterosexual marriage. It also highlights the political battles likely to follow.

Married housing is one concern identified in the letter. Dating policies prohibiting same-sex contact are another, along with questions about whether religious institutions would have to extend benefits to same-sex spouses of employees.

Legal scholars said the scenario of schools and charities losing their tax-exempt status over their policies on these issues was unlikely — especially in the short-term. But they did not rule it out, based on previous civil rights cases and an exchange during Supreme Court arguments in April initiated by Justice Samuel A. Alito Jr. on whether the Constitution guarantees same-sex couples the right to marry.

“In the Bob Jones case,” Alito said, referring to the 1983 Supreme Court decision, “the court held that a college was not entitled to tax-exempt status if it opposed interracial marriage or interracial dating. So would the same apply to a university or a college if it opposed same-sex marriage?”

Solicitor General Donald B. Verrilli Jr., representing the Obama administration, said that was possible. “I don’t think I can answer that question without knowing more specifics,” he said, “but it’s certainly going to be an issue. I don’t deny that. I don’t deny that, Justice Alito. It is going to be an issue.”

Chief Justice John G. Roberts Jr. asked a similar question. “Would a religious school that has married housing be required to afford such housing to same-sex couples?”

Verrilli did not rule that out either but said it would “depend on how states work out the balance between their civil rights laws.”

Douglas Laycock, a law professor at the University of Virginia, said the government’s vague response to Alito was ill-considered. “Church leaders are worried about this,” he said, particularly because “there is a certain obvious logic” to Alito’s question.

But he added that it was unimaginable that any administration of either party would try to deny a tax exemption anytime soon to a religious institution based on its views on homosexuality. “When gay rights looks like race does today, where you have a handful of crackpots still resisting,” he said, “you might see an administration picking a fight.”

That sort of analysis does not do much to calm religious schools’ concerns, said Richard Garnett, a law professor at Notre Dame.

“Although many people insist that this will not happen,” he said, “they tend to rely on political predictions — which are probably accurate, in the short term — and not on in-principle arguments or distinctions.”

Rick Scarborough, founder and president of Vision America, a conservative Christian organization based in Nacogdoches, Texas, said he had never seen pastors so riled up and ready to resist a Supreme Court ruling. He said 50,000 pastors and church members had signed a petition to the Supreme Court justices warning they would consider a law recognizing same-sex marriage an “unjust law.”

“If they change the playing field and make what we do out of bounds, we will disobey, we will disrespect this decision,” Scarborough said in an interview. “We’ll treat it like Dred Scott and other decisions courts have handed down over the years that counter natural law. God made a male and a female, and no amount of surgery is going to change that.”

The letter sent by more than 70 leaders of religious schools, released by the Family Research Council, a conservative religious organization in Washington, asked the Senate majority leader, Mitch McConnell, and the House speaker, John A. Boehner, to support legislation proposed by Sen. Mike Lee, R-Utah.

Lee introduced the bill last week, calling it the First Amendment Defense Act.

Even if President Barack Obama were to veto it, “the next Republican president in all likelihood would sign it pretty readily, so if nothing else this puts a marker down,” said Rob Schwarzwalder, senior vice president of the Family Research Council.

Among other things, the bill would prohibit the federal government from denying or revoking a tax exemption or disallowing a charitable deduction to an institution that opposes same-sex marriage for religious reasons.

“We need to draw lines around the power of government — lines that are there to protect the people from the overpowering influence of government — an overpowering influence that can, from time to time, trample on religious freedom,” Lee said at a news conference in Washington on June 3, announcing the legislation.

The 1983 decision concerned Bob Jones University in Greenville, South Carolina. Its policies required expulsion of “partners in an interracial marriage,” “students who date outside their race” and members of any group that “advocates interracial marriage.”

There are echoes of those policies in some colleges’ current stances on same-sex couples.

Brigham Young University’s honor code, for instance, bars “homosexual behavior,” including “not only sexual relations between members of the same sex, but all forms of physical intimacy that give expression to homosexual feelings.”

In a supporting brief in the pending Supreme Court case, the US Conference of Catholic Bishops said “it would seem a short step” from a decision in favor of same-sex marriage to the loss of tax exemptions for dissenting religious institutions.

Americans United for Separation of Church and State, in its own supporting brief, responded that “this concern is overblown.” If there is a threat to tax exemptions, the brief said, it arises from laws banning discrimination on the basis of sexual orientation and not from a potential constitutional ruling on same-sex marriage.

The reach of the Bob Jones decision itself is unclear.

In his majority opinion, Chief Justice Warren E. Burger wrote that Bob Jones University’s policies ran afoul of “a most fundamental national public policy,” one endorsed by “all three branches of the federal government.”

Congress has long banned racial discrimination, but there is no general federal law forbidding discrimination based on sexual orientation.

The decision’s background and reasoning may limit its sweep, said Ira C. Lupu, a law professor at George Washington University. “Bob Jones has never been extended to any context other than race,” he said. That includes sex discrimination, he said, to say nothing of sexual-orientation discrimination.

Loss of tax exemptions on that last ground, Lupu said, “would never happen until the religiously affiliated schools still doing that were complete outliers.”

Even so, said Eugene Volokh, a law professor at the University of California, Los Angeles, religious schools have real reasons for concern.

“If I were a conservative Christian (which I most certainly am not),” he wrote on a law and religion e-mail list, “I would be very reasonably fearful, not just as to tax exemptions but as to a wide range of other programs — fearful that within a generation or so, my religious beliefs would be treated the same way as racist religious beliefs are.”