FoxNews.com -

The Supreme Court ruled Monday in favor of a Colorado baker who refused to bake a wedding cake for a same-sex couple. 

In a 7-2 decision, the justices set aside a Colorado court ruling against the baker -- while stopping short of deciding the broader issue of whether a business can refuse to serve gay and lesbian people.

At issue was a July 2012 encounter between the couple and baker Jack Phillips.

At the time, Charlie Craig and David Mullins of Denver visited Masterpiece Cakeshop to buy a custom-made wedding cake. Phillips refused his services when told it was for a same-sex couple. A state civil rights commission sanctioned Phillips after a formal complaint from the gay couple.

The battle has since developed into perhaps the most closely watched appeal so far this term before the high court.

Mullins has described their case as symbolizing “the rights of gay people to receive equal service in business … about basic access to public life." 

But the Trump administration backed Phillips, who was represented in court by the Alliance Defending Freedom, a conservative Christian nonprofit. He had lost at every step in the legal appeals process, bringing the case down to the Supreme Court.

Phillips has said he lost business and had to let employees go because of the controversy.

And he has maintained that it’s his choice: "It's not about turning away these customers, it's about doing a cake for an event -- a religious sacred event -- that conflicts with my conscience," he said last year.

The court in December specifically examined whether applying Colorado's public accommodations law to compel the local baker to create commercial "expression" violated his constitutionally protected Christian beliefs about marriage.

By wading again into the culture wars, the justices had to confront recent decisions on both gay rights and religious liberty: a 2015 landmark opinion legalizing same-sex marriage nationwide and a separate 2014 decision affirming the right of some companies to act on their owner's faith by refusing to provide contraception to its workers.

The Trump administration agreed with Phillips' legal claims to a large extent. Attorney General Jeff Sessions in October issued broad guidance to executive branch agencies, reiterating the government should respect religious freedom, which in the Justice Department's eyes extends to people, businesses and organizations.

But civil rights groups were concerned the conservative majority on the court may be ready to peel back protections for groups with a history of enduring discrimination – and predicted that giving businesses the right to refuse service to certain customers would undermine non-discrimination laws and hurt minorities.