WASHINGTON — The U.S. Supreme Court said Monday that it would review the case of a Colorado baker who refused to make a wedding cake for a gay couple because of his beliefs — a legal fight with high stakes for both religious activists and civil-rights advocates.

For months, the high court has vacillated on whether it would hear the appeal of Jack Phillips, the owner of Masterpiece Cakeshop in Lakewood, whose refusal of service to Charlie Craig and David Mullins was rejected by the Colorado Court of Appeals and the state’s Civil Rights Commission.

There’s been one significant change to the Supreme Court, however, since the case first landed on its steps — the addition of Justice Neil Gorsuch, a native Coloradan who became its ninth member this spring after his nomination by President Donald Trump.

Prior to his appointment, Gorsuch earned a reputation as a jurist on the Denver-based 10th Circuit Court of Appeals who gave wide latitude to religious beliefs. Now he’ll get a chance to help decide a case from his home state with major implications for the nation’s legal system.

The outcome “could have substantial effect around the country, depending on how the court rules,” said Carl Tobias, a court analyst and professor at the University of Richmond School of Law.

In particular, Tobias said, it’s almost certain to impact the ability of same-sex couples to seek so-called “expressive” services provided by people such as florists or bakers.

“From their perspective, it’s important in terms of dignity and being full citizens,” he said. “On the other hand, there, I think, will be people arguing that their religious freedom is restricted, like the baker here.”

Phillips couldn’t be reached for comment Monday, but in a letter to The Denver Post printed last year, he said he was appealing his losses in the lower courts because he believed his right to expression — as a cake artist — was being violated.

“I’ll sell anyone any cake I’ve got,” he wrote. “But I won’t design a cake that promotes something that conflicts with the Bible’s teachings. And that rule applies to far more than cakes celebrating same-sex marriages. I also won’t use my talents to celebrate Halloween, anti-American or anti-family themes, atheism, racism, or indecency.”

A lawyer for Phillips on Monday compared his case to one involving another Denver-area business, Azucar Bakery, that in 2014 refused to bake cakes with anti-gay messages and imagery, actions that the Colorado Civil Rights Division later ruled as not discriminatory.

“The government in Colorado is picking and choosing which messages they’ll support and which artistic messages they’ll protect,” said Kristen Waggoner of the Alliance Defending Freedom, which took the baker’s case.

The couple and civil-rights groups, however, see that argument as a thinly veiled excuse for prejudice.

“This has always been about more than a cake,” Mullins said Monday through the ACLU of Colorado, which is representing the couple. “Businesses should not be allowed to violate the law and discriminate against us because of who we are and who we love.”

The LGBT rights group Freedom for All Americans, in a statement, called the couple’s denial of service a violation of Colorado’s nondiscrimination law.

“All of us cherish the American promise of religious freedom as protected under the U.S. Constitution, but that doesn’t give anyone the right to discriminate against others,” said the group’s acting CEO, Kasey Suffredini. “This case will be an important opportunity to have a national conversation about the values we all share as Americans and the importance of equal treatment for everyone.”

On the same day the Supreme Court agreed to hear the baker case, called Masterpiece Cakeshop v. Colorado Civil Rights Commission, it ruled on another religious dispute — finding in a 7-2 decision that religious institutions could seek state money for nonreligious needs.

That outcome stemmed from the efforts of Trinity Lutheran Church of Columbia, Missouri, to get state funding to resurface a playground.

Tom McGhee and The Associated Press contributed to this article.