(CNSNews.com) - In a 7-2 ruling, the U.S. Supreme Court on Monday ruled in favor of a Christian baker who refused to create a wedding cake for a same-sex couple.

In Masterpiece Cakeshop v. Colorado Civil Rights Commission, the court ruled that the commission “violated the the Free Exercise Clause” by requiring Jack Phillips to go against his religious beliefs about gay marriage and make a customized wedding cake for a gay couple, Charlie Craig and David Mullins.

“While it is unexceptional that Colorado law can protect gay persons in acquiring products and services on the same terms and conditions as are offered to other members of the public, the law must be applied in a manner that is neutral toward religion,” the Court wrote in its opinion.

The justices ruled that “the Commission’s treatment of Phillips’ case violated the State’s duty under the First Amendment not to base laws or regulations on hostility to a religion or religious viewpoint.

Conservatives hailed the decision.

"Today, the Supreme Court ruled 7-2 in favor of Jack Phillips and more importantly the First Amendment,” American Family Association President Tim Wildmon said in a statement.

“The high court specifically rebuked the Colorado Commission for its demonstrable venomous hostility toward Mr. Phillips’ Christian beliefs in handing down their decision. This is an important day for all who value liberty in general and religious liberty in particular. We applaud the Supreme Court’s decision," Wildmon said.

The Alliance Defending Freedom considered the ruling a victory for religious liberty.

“Jack serves all customers; he simply declines to express messages or celebrate events that violate his deeply held beliefs. Creative professionals who serve all people should be free to create art consistent with their convictions without the threat of government punishment,” Alliance Defending Freedom Senior Counsel Kristen Waggoner said in a statement.

“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. Tolerance and respect for good-faith differences of opinion are essential in a society like ours. This decision makes clear that the government must respect Jack’s beliefs about marriage,” Waggoner added.

Sen. Orrin Hatch (R-Utah), chair of the Senate Judiciary Committee also applauded the decision, saying, “Hostility toward religion has no place in government. At the same time, religious freedom means much more than freedom from government hostility. Courts must protect the ability of believers to freely live their faith and to express their religious beliefs openly and honestly.”

The American Civil Liberties Union (ACLU), which argued the case on behalf of the same-sex couple who were denied the wedding cake, said the court “reaffirmed the core principle that businesses open to the public must be open to all.”

“The court did not accept arguments that would have turned back the clock on equality by making our basic civil rights protections unenforceable, but reversed this case based on concerns specific to the facts here,” the ACLU said Monday.

“The court reversed the Masterpiece Cakeshop decision based on concerns unique to the case but reaffirmed its longstanding rule that states can prevent the harms of discrimination in the marketplace, including against LGBT people,” ACLU’s Deputy Legal Director Louise Melling said in a statement.

The same-sex couple who filed the complaint with the commission about the Masterpiece Cakeshop said the court’s decision “means our fight against discrimination and unfair treatment will continue.

“We have always believed that in America, you should not be turned away from a business open to the public because of who you are. We brought this case because no one should have to face the shame, embarrassment, and humiliation of being told ‘we don’t serve your kind here’ that we faced, and we will continue fighting until no one does,” Charlie Craig and Dave Mullins, client in the Masterpiece Cakeshop case, said in a statement after the ruling.