(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 forceful 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 and lesbian advocates a long-sought victory.

President Barack Obama, speaking after the highly anticipated ruling, urged those celebrating to keep in mind 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, fierce battles over religious and LGBT rights, like the one fought this spring in Indiana, seem likely to intensify across the country after Obergefell v. Hodges.

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. Leaders from those groups pledged on Friday to seek legal means to shield their beliefs from state interference.

In his sweeping decision, Justice Anthony Kennedy, who wrote for the majority, 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 said.

"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."

But more conservative justices and a number of religious groups chided Kennedy for failing to mention the First Amendment's "free exercise" clause.

Photos: U.S. reacts to same-sex marriage ruling Photos: U.S. reacts to same-sex marriage ruling The White House is lit up in rainbow colors in commemoration of the Supreme Court's ruling to legalize same-sex marriage on Friday, June 26. The court ruled that states cannot ban same-sex marriage , handing gay rights advocates their biggest victory yet. Hide Caption 1 of 17 Photos: U.S. reacts to same-sex marriage ruling Ariel Olah, left, and her fiancee, Katie Boatman, are overcome by emotion outside the U.S. Supreme Court in Washington on Friday, June 26. Hide Caption 2 of 17 Photos: U.S. reacts to same-sex marriage ruling People wave a giant equality flag as they celebrate outside the Supreme Court on June 26. Hide Caption 3 of 17 Photos: U.S. reacts to same-sex marriage ruling James Obergefell, the lead plaintiff in the case brought before the Supreme Court, listens to a phone call from President Barack Obama after the landmark decision on June 26. Hide Caption 4 of 17 Photos: U.S. reacts to same-sex marriage ruling Same-sex marriage activists and supporters rejoice in Washington after the ruling. Hide Caption 5 of 17 Photos: U.S. reacts to same-sex marriage ruling Eric Braman, left, and Kris Katkus were the first to register for a marriage license in Kalamazoo, Michigan, after the Supreme Court ruling. Hide Caption 6 of 17 Photos: U.S. reacts to same-sex marriage ruling After the ruling, there were cheers outside City Hall in San Francisco. Hide Caption 7 of 17 Photos: U.S. reacts to same-sex marriage ruling Chris Svoboda, president of the Virginia Equality Bar Association, raises her arms in victory on the steps of the Supreme Court on June 26. Hide Caption 8 of 17 Photos: U.S. reacts to same-sex marriage ruling Jaque Roberts, left, and her partner of 31 years, Carmelita Cabello, arrive at the Travis County building in Austin, Texas, for a marriage license on June 26. Hide Caption 9 of 17 Photos: U.S. reacts to same-sex marriage ruling Doug Mest, left, and Mark Pelekakis kiss outside the Stonewall Inn in New York, the site of the 1969 Stonewall riots and an iconic bar in the LGBT community. Hide Caption 10 of 17 Photos: U.S. reacts to same-sex marriage ruling Laura Zinszer, left, and Angela Boyle kiss after receiving their marriage license June 26 in Columbia, Missouri. They were Boone County's first same-sex couple to receive their marriage license. Hide Caption 11 of 17 Photos: U.S. reacts to same-sex marriage ruling A group of same-sex marriage advocates film a video selfie in front of the Supreme Court on June 26. Hide Caption 12 of 17 Photos: U.S. reacts to same-sex marriage ruling U.S. Rep. Mark Takano of California sings the national anthem June 26 with members of the Gay Men's Chorus of Washington. Hide Caption 13 of 17 Photos: U.S. reacts to same-sex marriage ruling Oakland County Clerk Lisa Brown, center, marries Breanne Brodak, left, and Cortney Tucker in Pontiac, Michigan, on June 26. Hide Caption 14 of 17 Photos: U.S. reacts to same-sex marriage ruling A man holds a rainbow flag outside the Supreme Court on June 26. Hide Caption 15 of 17 Photos: U.S. reacts to same-sex marriage ruling Kathy Petterson, left, and Beverly Reicks leave the Douglas County Clerk's office on June 26 after becoming the first same-sex couple to wed in Omaha, Nebraska. Hide Caption 16 of 17 Photos: U.S. reacts to same-sex marriage ruling Carlos McKnight of Washington waves a rainbow flag in support of same-sex marriage on June 26. See photos from states that approved same-sex marriage before the Supreme Court ruling Hide Caption 17 of 17

Religious rights (and rites) aren't limited to preaching and teaching, they argued. They also entail individuals' and organizations' "free exercise" of faith, a wide swath of activities that run from sacred ceremonies to performing charitable works and running businesses according to religious principles.

"Religious liberty is about freedom of action in matters of religion generally," Justice Clarence Thomas said in his dissent, "and the scope of that liberty is directly correlated to the civil restraints placed upon religious practice."

He dismissed the majority's nod toward religious liberty as a "weak gesture," arguing that the ruling could have "ruinous consequences."

"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."

Photos: Couples celebrate same-sex marriage legalization Photos: Couples celebrate same-sex marriage legalization "A pic for the future kids. So they can see that their moms were at the Supreme Court the day love became law," said Rachel Evans via Instagram. Hide Caption 1 of 6 Photos: Couples celebrate same-sex marriage legalization Eos Parish and Brant Rios are unable to get married in Louisiana despite the Supreme Court ruling to legalize same-sex marriages nationwide. In 25 days they will try again. Hide Caption 2 of 6 Photos: Couples celebrate same-sex marriage legalization "The wrong side of history lost today while America's promise of democracy just got stronger," said Michael Dumlao via Instagram. Hide Caption 3 of 6 Photos: Couples celebrate same-sex marriage legalization Alex Orton hugs boyfriend Rob Snyder after hearing the Supreme Court ruling. "What an amazing day for the United States and for LGBT people across the nation," he said. Hide Caption 4 of 6 Photos: Couples celebrate same-sex marriage legalization Kristen Nichole captured this photo of two women celebrating the decision to legalize same-sex marriage nationwide on Friday. "So excited to be on the steps of the Supreme Court today supporting the equal marriage decision!" she said via Instagram Hide Caption 5 of 6 Photos: Couples celebrate same-sex marriage legalization Michael Thorning captured this photo of the crowd celebrating after the Supreme Court decision to legalize marriage in all 50 states. Hide Caption 6 of 6

Friday's decision makes it "all but inevitable," the conservative justice said, that competing definitions of marriage will come into conflict. Thomas suggested that pastors and churches will be confronted with demands to participate in and endorse same-sex marriages.

There is historical precedent for such demands, Thomas said, citing Virginia laws that once imposed criminal penalties on pastors who presided over mixed-race marriages.

Chief Justice John Roberts said "hard questions" will arise when people of faith exercise their religious liberty in ways that conflict with the new right to same-sex marriage.

What happens, the chief justice asked, when a religious college provides student housing only to heterosexual couples? Or a faith-based adoption agency refuses to place children with same-sex spouses? Would both lose their tax exemptions?

"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, accusing his colleagues of playing God.

Photos: LGBT rights in 10 countries Photos: LGBT rights in 10 countries Supporters of LGBT at the University of the Philippines campus in Manila celebrate Pride Month on June 27, 2013. Hide Caption 1 of 11 Photos: LGBT rights in 10 countries Christian demonstrators protest during a gay pride march in December, 2013, in Manila, Philippines. Hide Caption 2 of 11 Photos: LGBT rights in 10 countries An activist in Hong Kong holds a placard with a slogan over the face of Russian President Vladimir Putin during a demonstration against Russia's anti-gay legislation on the day of the opening ceremony of the Sochi Winter Olympic Games in February, 2014. Hide Caption 3 of 11 Photos: LGBT rights in 10 countries People in Madrid, Spain react to a law allowing same-sex couples to marry and adopt children in Spain in June, 2005. Hide Caption 4 of 11 Photos: LGBT rights in 10 countries About 50 men accused of breaking laws covering obscenity and public morality cover their faces as they enter a state security court for their trial in Cairo, Egypt in July, 2001. Hide Caption 5 of 11 Photos: LGBT rights in 10 countries Then-Canadian Prime Minister Paul Martin stands to vote in the House of Commons in Ottawa to pass the same sex marriage bill in June, 2005. Hide Caption 6 of 11 Photos: LGBT rights in 10 countries Tshepo Modisane and Thobajobe Sithole kiss at their wedding at Siva Sungum Hall in Kwadukuza, South Africa in April, 2013. Hide Caption 7 of 11 Photos: LGBT rights in 10 countries Singaporeans dress in pink in support of gays and lesbians as they gather at "Speakers' Corner" in Singapore in June, 2014. Hide Caption 8 of 11 Photos: LGBT rights in 10 countries Supporters of gay rights attend the annual canal parade -- a Gay Pride Week event -- in Amsterdam, Netherlands, in August, 2014. Hide Caption 9 of 11 Photos: LGBT rights in 10 countries U.S. Ambassador to the Dominican Republic and gay rights activist James Brewster, center, arrives to present his credentials to Dominican President Danilo Medina in December, 2013, during a ceremony at the National Palace in Santo Domingo. Hide Caption 10 of 11 Photos: LGBT rights in 10 countries Same-sex couples kiss during a protest by the LGBT community at the Bolivar Square in Bogota,Colombia, in November 2012. Hide Caption 11 of 11

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 U.S. Catholic bishops' point-man on religious rights, said Friday's ruling will affect "thousands" of state and local statutes across the country. The archbishop said he could foresee "a lot of legal controversies in terms of the way we organize and run our ministries."

Most troubling for the Catholic Church, Lori said in a conference call with the media, is that while ruling recognizes religious groups' right to free speech, it doesn't acknowledge "the right to follow our teachings when we are intersecting with the broader society."

Evangelicals, too, who make up about 25% of the country's population, pledged to fight the legal implications of Friday's ruling.

"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," dozens of prominent evangelicals said in a joint statement.

"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 casualties on both sides.

"One of the most tragic results we could possibly see is an unrelenting cultural war from progressives toward those who dissent because of deeply held religious convictions."