The White House on Tuesday praised a Supreme Court ruling in favor of a Colorado baker who refused to make a wedding cake for a gay couple.

White House Press Secretary Sarah Huckabee Sanders hailed the decision as a win for religious freedom.

“When it comes to the bakers, we were pleased with the Supreme Court’s decision,” Sanders said. “The First Amendment prohibits government discriminating on the basis of religious beliefs, and the Supreme Court rightly concluded that the Colorado Civil Rights Commission failed to show tolerance and respect for his religious beliefs.”

The U.S. Department of Justice filed an amicus brief in support of Jack Phillips, the owner of Masterpiece Cakeshop, who said that making such a cake would violate his religious beliefs.

“In this case and others, the Department of Justice will continue to vigorously defend the free speech and religious freedom First Amendment rights,” Sanders said.

The Supreme Court said that the Colorado Civil Rights Commission had shown hostility toward Phillips' religious beliefs in ruling that he had violated the state's anti-discrimination laws when he refused to make the cake. Rather than striking down the law, the high court vacated the decision.

(Related: Supreme Court narrowly sides with baker who refused gay couple.)