(CNN) -- The battle over same-sex marriage may have drawn to a dramatic close Friday at the Supreme Court. But as several justices noted in scorching dissents, the war between religious and LGBT rights is far from over.
In a landmark opinion, a divided Supreme Court ruled that states cannot ban same-sex marriage, establishing a new civil right and handing gay rights advocates a long-sought victory.
President Barack Obama, speaking after the highly anticipated ruling in Obergefell v. Hodges, urged those celebrating to remember that many Americans oppose same-sex marriage "based on sincere and deeply held beliefs." Those beliefs, he suggested, should remain a protected part of the country's "deep commitment to religious freedom."
Still, pitched battles over religious and LGBT rights, like the one fought this spring in Indiana, seem likely to intensify across the country. While polls show that a majority of religious Americans now support same-sex marriage, many prominent groups -- such as the Catholic Church, the Southern Baptist Convention and the Church of Jesus Christ of Latter-day Saints -- do not.
In his sweeping decision, Justice Anthony Kennedy, who wrote for the majority with the four liberal justices, briefly mentioned faith groups' right to object to same-sex marriage.
"The First Amendment ensures that religions, those who adhere to religious doctrines and others have protection as they seek to teach the principles that are so fulfilling and so central to their lives and faiths," Kennedy said.
The point bears repeating, the justice indicated.
"It must be emphasized that religions, and those who adhere to religious doctrines, may continue to advocate with utmost, sincere conviction that, by divine precepts, same-sex marriage should not be condoned."
Religious groups and individuals who oppose same-sex marriage must be given "proper protection as they seek to teach the principles that are so fulfilling and so central to their lives and faiths, and to their own deep aspirations to continue the family structure they have long revered," Kennedy continued.
But more conservative justices and a number of religious groups chided Kennedy for failing to mention the First Amendment's "free exercise" rights.
Religious rights aren't limited to preaching and teaching, they argued. They also entail individuals' and organizations' "free exercise" of faith, a wide scope of activities that run from performing charitable works to running businesses according to religious principles.
"Religious liberty is about freedom of action in matters of religion generally, and the scope of that liberty is directly correlated to the civil restraints placed upon religious practice," Justice Clarence Thomas said in his dissent.
He dismissed the majority's nod toward religious liberty as a "weak gesture."
In fact, the majority's ruling could have "ruinous consequences" for religious liberty, Thomas argued.
"In our society, marriage is not simply a governmental institution; it is a religious institution as well," Thomas said. "Today's decision might change the former, but it cannot change the latter."
Friday's decision makes it "all but inevitable," the conservative justice writes, that competing definitions of marriage "will come into conflict, particularly as individuals and churches are confronted with demands to participate in and endorse civil marriages between same-sex couples."
There is historical precedent for such conflicts, Thomas notes, citing Virginia laws that once imposed criminal penalties on pastors who presided over mixed-race marriages.
The Supreme Court may soon be hearing similar church-state conflicts over marriage, said Chief Justice John Roberts in his dissent.
"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," Roberts said.
What happens, the chief justice continues, when a religious college provides married student housing only to heterosexual couples? Or a religious adoption agency refuses to place children with same-sex spouses? Would both lose their tax exemptions?
"It's certainly going to be an issue," Solicitor General Donald B. Verrilli Jr. acknowledged during the oral arguments for Obergefell v. Hodges. "I don't deny that." (Roberts cited the exchange in his dissent.)
"There is little doubt that these and similar questions will soon be before this Court," Roberts continued. "Unfortunately, people of faith can take no comfort in the treatment they receive from the majority today."
Justice Antonin Scalia, in his signature scathing style, took the argument even further.
The conservative justice said that Friday's ruling on same-sex marriage "is not of special importance to me."
"It is of overwhelming importance, however, who it is that rules me," Scalia said. "Today's decree says that my Ruler, and the Ruler of 320 million Americans coast-to-coast, is a majority of the nine lawyers on the Supreme Court."
Archbishop William Lori of Baltimore, the Catholic bishops' point-man on religious rights in the United States, said Friday's ruling affects not just one law but "hundreds of thousands" of state and local statutes across the country.
The majority's ruling recognizes religious groups' right to free speech, Lori said in a conference call with the media.
"But it doesn't acknowledge what the First Amendment also protects, which is the right to follow our teachings when we are intersecting with the broader society."
The Supreme Court's ruling will give rise to "a lot of legal controversies in terms of the way we organize and run our ministries," Lori continued.
In a joint statement released on Friday, dozens of prominent evangelicals pledged "not to capitulate on marriage."
"In the coming years, evangelical institutions could be pressed to sacrifice their sacred beliefs about marriage and sexuality in order to accommodate whatever demands the culture and law require," the statement said.
"We will not allow the government to coerce or infringe upon the rights of institutions to live by the sacred belief that only men and women can enter into marriage."
One of the statement's signees, Russell Moore, president of the Southern Baptist Convention's Ethics & Religious Liberty Commission, called "religious liberty" the "next front in the skirmish in American life."
The skirmish will likely endure for years, Moore said at a press conference on Friday, with cultural casualties on both sides.
"I do believe that one of the most tragic results we could possibly see is an unrelenting cultural war from cultural progressives toward those who dissent because of deeply held religious convictions."