KUSA – In a 7 to 2 opinion, the U.S. Supreme Court has ruled in favor of Masterpiece Cakeshop in the Colorado case that has garnered national attention and could have an impact that extends beyond just one Lakewood baker.

Justice Anthony Kennedy delivered the majority opinion for the court.

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

READ THE DECISION HERE: https://bit.ly/2JfUZPt

In his opinion, Justice Neil Gorsuch, who was appointed to the Supreme Court last year by President Donald Trump, was critical of the Colorado Civil Rights Commission.

"The Colorado Civil Rights Commission failed to act neutrally toward Jack Phillips’s religious faith," Gorsuch wrote. "Most notably, the Commission allowed three other bakers to refuse a customer’s request that would have required them to violate their secular commitments. Yet it denied the same accommodation to Mr. Phillips when he refused a customer’s request that would have required him to violate his religious beliefs."

Gorsuch, who served on the U.S. Court of Appeals for the 10th Circuit in downtown Denver before he joined with nation's highest court, also noted the Jack Phillips, the owner of Masterpiece Cakeshop, offered to make other baked goods for the couple, including cakes celebrating other occasions.

Justice Ruth Bader Ginsburg wrote the dissenting opinion. She was joined by Justice Sonia Sotomayor who also sided with the couple, David Mullins and Charlie Craig.

"The fact that Phillips might sell other cakes and cookies to gay and lesbian customers was irrelevant to the issue Craig and Mullins’ case presented. What matters is that Phillips would not provide a good or service to a same-sex couple that he would provide to a heterosexual couple," Ginsberg wrote.

In a statement issued after the ruling Monday, Phillips’ Supreme Court lawyer praised the decision.

“Government hostility toward people of faith has no place in our society, yet the state of Colorado was openly antagonistic toward Jack’s religious beliefs about marriage. The court was right to condemn that,” said Kristen Waggoner, the Alliance Defending Freedom senior counsel who argued Phillips’ case.

RELATED: How the Supreme Court could decide the Cakeshop case

Before the ruling, news media, including 9NEWS, talked with experts and researched past rulings to lay out potential decisions that SCOTUS could hand down.

THE POSSIBLE DECISIONS | How the supreme court could decide the cake shop case

Masterpiece Cakeshop jack phillips_1461604008587.jpg
Masterpiece Cakeshop owner Jack Phillips (CREDIT: 9NEWS)

The court battle between the Masterpiece Cakeshop and Colorado Civil Rights Commission dates back to July 2012, when David Mullins and Charlie Craig attempted to order a cake for their wedding reception at a small shop in a Lakewood strip mall. Jack Phillips, who owns the bakery, told them they wouldn’t sell wedding cakes to same-sex couples based on his religious beliefs.

“This is an event that goes against my faith,” Phillips said.

This prompted Mullins and Craig to file a complaint with the Colorado Civil Rights Commission, citing a state law that bars businesses that are open to the public from discriminating based on things like race, religion or sexual orientation.

“The way we were treated at Masterpiece Cakeshop was both illegal and wrong,” Mullins said.

The Colorado Civil Rights Commission sided with the couple – and on Aug. 13, 2015, so did the state court of appeals. This is despite Phillips’ assertion that selling a wedding cake to a same-sex couple violated his freedom of speech and religion.

David Mullins (L) and Charlie Craig wait to speak to journalists after the U.S. Supreme Court hear the case Masterpiece Cakeshop v. Colorado Civil Rights Commission December 5, 2017 in Washington, DC
 David Mullins (L) and Charlie Craig wait to speak to journalists after the U.S. Supreme Court hear the case Masterpiece Cakeshop v. Colorado Civil Rights Commission December 5, 2017 in Washington, DC
Chip Somodevilla/Getty Images

PREVIOUS | Colorado baker to go before US Supreme Court

The Colorado Court of Appeals, however, found that in this case, Colorado’s Anti-Discrimination Act infringed on neither of these things.

The Colorado State Supreme Court let this ruling stand – but the nation’s highest court did have interest in hearing the case. Oral arguments were on Dec. 5, 2017.

Justices on both sides of the aisle peppered four lawyers with questions to illustrate how their decision might affect other merchants, such as chefs and florists – as well as other minority groups.

PREVIOUS | Supreme Court deeply divided over gay wedding cake

About 20 states have anti-discrimination laws similar to Colorado’s, meaning that they include sexual orientation, according to Scott Skinner, who teaches constitutional law at the University of Colorado. Should the court rule in favor of the cake shop, this could strike down Colorado’s law and others like it.

During oral arguments, the liberal Supreme Court justices were largely in favor of Mullins and Craig’s rights, while the conservatives were in favor of Phillips’ freedom of speech.

Justice Anthony Kennedy suggested that what occurred was an “affront to the gay community” but also accused Colorado’s Civil Rights Commission of exhibiting a “hostility toward religion.”

PREVIOUS | In a case about a cake, Supreme Court justices raise constitutional and culinary questions

People rally for Jack Phillips, owner of Masterpiece Cake in Colorado, outside the US Supreme Court before Masterpiece Cakeshop vs. Colorado Civil Rights Commission is heard on December 5, 2017 in Washington, DC.
People rally for Jack Phillips, owner of Masterpiece Cake in Colorado, outside the US Supreme Court before Masterpiece Cakeshop vs. Colorado Civil Rights Commission is heard on December 5, 2017 in Washington, DC.
MARI MATSURI, This content is subject to copyright.

“Tolerance is essential to a free society,” Kennedy said at the time.

The justices also weighed more abstract issues. Phillips has argued that he is a “creative artist” and his cakes are a form of expression and therefore entitled to First Amendment protection.

This led to a discussion about whether food can be considered a form of speech, or if it’s something more utilitarian.

And if a cake is a form of speech, the justices theorized, what about wedding rings or hair styles or other services offered at weddings? And if food is considered art, then can “great restaurants” refuse service based on certain occasions?

PREVIOUS: Gay couple, devout baker take cake fight to high court

“So the baker is speech, but the great chef who is like, everything is perfect on the plate and it’s a work of art, it is a masterpiece?” Justice Elena Kagen asked.

"My colleagues, I think, go to more elite restaurants than I do," Justice Samuel Alito deadpanned.

As for Phillips, he said he’s stopped making wedding cakes altogether – and in November, told USA TODAY that he’s since lost 40 percent of his business.

“They’re asking me to use my artistic talent, my time, my energy, to create something special for their wedding," he said. "I feel that by my cake’s presence there, that people would say, 'Oh, he made that? He’s OK with same-sex marriage.'"

People rally for Jack Phillips, owner of Masterpiece Cake in Colorado, outside the US Supreme Court before Masterpiece Cakeshop vs. Colorado Civil Rights Commission is heard on December 5, 2017 in Washington, DC.
People rally for Jack Phillips, owner of Masterpiece Cake in Colorado, outside the US Supreme Court before Masterpiece Cakeshop vs. Colorado Civil Rights Commission is heard on December 5, 2017 in Washington, DC.
MARI MATSURI, This content is subject to copyright.

PREVIOUS | Colorado baker disputes anti-discrimination law

Craig and Mullins – who are now married – said that a win for them would have been a win for the entire gay community, and prevent broader discrimination against other groups.

“It’s embarrassing to admit that we cried over this, but it’s true," Mullins said. "The pain of being publicly rejected in that way, and feeling that you have no recourse — that this is just the way people are allowed to treat you because of who you are and who you love — is devastating.”

The Supreme Court has weighed in twice on the subject of same-sex marriage. In 2013, it ruled that the federal government must recognize gay and lesbian marriages in the 12 states that had legalized them. In 2015, it extended same-sex marriage nationwide.

PREVIOUS | Court: Cake shop discriminates against gays

9NEWS Reporter Brandon Rittiman and USA TODAY contributed to this report.