(The Hill) — A California state judge on Friday handed a victory to a bakery owner who refused to make a wedding cake for a same-sex couple, citing religious objections.

Kern County Superior Court Judge J. Eric Bradshaw ruled that California’s Department of Fair Housing and Employment failed to show that Tastries Bakery owner Cathy Miller violated the state’s Unruh Civil Rights Act by intentionally discriminating against the couple.

Miller refused to make a custom cake for Mireya and Eileen Rodriguez-Del Rio in 2017 for their wedding and referred them to another bakery, court filings show.

The judge ruled that baking the custom cake falls under “artistic expression,” so Miller’s First Amendment protections to free speech supersedes the state’s interest.

“[The department] failed to prove that defendants intentionally discriminated against Eileen and Mireya because of their sexual orientation,” the judge ruled. 

“The evidence affirmatively showed that Miller’s only intent, her only motivation, was fidelity to her sincere Christian beliefs,” Bradshaw continued. “Miller’s only motivation in creating and following the design standards, and in declining to involve herself or her business in designing a wedding cake for a marriage at odds with her faith, was to observe and practice her own Christian faith.”

Another judge in the Kern County Superior Court ruled in favor of Miller in 2018, but an appeals court later sent the case back to the lower court.

Charles LiMandri and others at the Thomas More Society, a conservative public-interest law firm that represented Miller and regularly takes cases opposing same-sex marriage and abortion, hailed the ruling as a victory for free speech and free expression of religion under the First Amendment.

“We applaud the court for this decision,” said LiMandri, special counsel at the Thomas More Society. “The freedom to practice one’s religion is enshrined in the First Amendment, and the United States Supreme Court has long upheld the freedom of artistic expression.”

The group had argued Miller was following the Bible’s teachings when she refused to make the cake.

“There’s a certain irony there that a law intended to protect individuals from religious discrimination was used to discriminate against Cathy for her religious beliefs,” said Paul Jonna, special counsel at the society.

The couple said they expect an appeal, according to the Associated Press.

The Hill has reached out to California’s Department of Fair Housing and Employment for comment.