The Supreme Court ruled for a Colorado baker who wouldn't make a wedding cake for a same-sex couple in a limited decision that leaves for another day the larger issue of whether a business can invoke religious objections to refuse service to gay and lesbian people.

The justices' decision Monday turned on what the court described as anti-religious bias on the Colorado Civil Rights Commission when it ruled against baker Jack Phillips. The justices voted 7-2 that the commission violated Phillips' rights under the First Amendment.

The case had been eagerly anticipated as, variously, a potentially strong statement about the rights of LGBT people or the court's first ruling carving out exceptions to an anti-discrimination law. In the end, the decision was modest enough to attract the votes of liberal and conservative justices on a subject that had the potential for sharp division.

Justice Anthony Kennedy said in his majority opinion that the larger issue "must await further elaboration" in the courts. Appeals in similar cases are pending, including one at the Supreme Court from a florist who didn't want to provide flowers for a same-sex wedding.

The disputes, Kennedy wrote, "must be resolved with tolerance, without undue disrespect to sincere religious beliefs, and without subjecting gay persons to indignities when they seek goods and services in an open market."

The same-sex couple at the heart of the case, Charlie Craig and Dave Mullins, complained to the Colorado commission in 2012 after they visited Phillips' Masterpiece Cakeshop in suburban Denver and the baker quickly told them he would not create a cake for their wedding celebration. They were married in Massachusetts because same sex marriage was not yet legal in Colorado.

Colorado law prohibits discrimination on the basis of sexual orientation, and the commission concluded that Phillips' refusal violated the law, despite Phillips' argument that he is opposed to same-sex marriage on religious grounds. Colorado state courts upheld the determination.

But when the justices heard arguments in December, Kennedy was plainly bothered by comments by a commission member that the justice said disparaged religion. The commissioner seemed "neither tolerant nor respectful of Mr. Phillips' religious beliefs," Kennedy said in December.

That same sentiment coursed through his opinion Monday. "The commission's hostility was inconsistent with the First Amendment's guarantee that our laws be applied in a manner that is neutral toward religion," he wrote.

Liberal justices Stephen Breyer and Elena Kagan joined the conservative justices in the outcome. Kagan wrote separately to emphasize the limited ruling.

Justices Ruth Bader Ginsburg and Sonia Sotomayor dissented. "There is much in the court's opinion with which I agree," Ginsburg wrote of Kennedy's repeated references to protecting the rights of gay people. "I strongly disagree, however, with the court's conclusion that Craig and Mullins should lose this case."

The Trump administration intervened in the case on Phillips' behalf, and Attorney General Jeff Sessions praised the decision. "The First Amendment prohibits governments from discriminating against citizens on the basis of religious beliefs. The Supreme Court rightly concluded that the Colorado Civil Rights Commission failed to show tolerance and respect for Mr. Phillips' religious beliefs," Sessions said.

President Donald Trump was unusually vague about the decision, simply tweeting, "Big Supreme Court ruling for Baker just out!" — more than 11 hours later.

Kristen Waggoner, the Alliance Defending Freedom senior counsel who argued Phillips' case, said the court was right to condemn the commission's open antagonism toward Phillips' religious beliefs about marriage.

Waggoner said Phillips is willing to sell ready-made products to anyone who enters his store. But, "he simply declines to express messages or celebrate events that violate his deeply held beliefs," she said.

Phillips was at his shop Monday morning, where he was busy answering the phone and getting congratulations from his supporters in person, including his pastor. One woman brought him balloons and others hugged him.

The American Civil Liberties Union, which represented the couple in its legal fight, said it was pleased the court did not endorse a broad religion-based exemption from anti-discrimination laws.

"We read this decision as a reaffirmation of the court's longstanding commitment to civil rights protections and the reality that the states have the power to protect everyone in America from discrimination, including lesbian, gay, bisexual and transgender people," said James Esseks, director of the ACLU LGBT & HIV Project.

Waggoner and Esseks disagreed about the ruling's effect on Phillips' wedding cake business. Waggoner said her client can resume his refusal to make cakes for same-sex marriages without fear of a new legal fight. But Esseks said that if another same-sex couple were to ask Phillips for a wedding cake, "I see no reason in this opinion that Masterpiece Cakeshop is free to turn them away."

Craig, one of the plaintiffs, said Monday night he will continue to fight against discrimination. He told supporters during a rally at the Colorado Capitol that he and his partner brought the case "because no one should have to face the shame, embarrassment and humiliation of being told 'we don't serve your kind here.'"

Several other legal disputes are pending over wedding services, similar to the Phillips case. In addition to florists, video producers and graphic artists are among business owners who say they oppose same-sex marriage on religious grounds and don't want to participate in same-sex weddings.

Barronelle Stutzman, a florist in Richland, Washington, has appealed a state Supreme Court ruling that found she violated state law for refusing to provide the wedding flowers for two men who were about to be married.

The justices could decide what to do with that appeal by the end of June.

___

Associated Press writers P. Solomon Banda, Nicholas Riccardi and Thomas Peipert contributed to this report from Denver.