Tastries Bakery owner Cathy Miller did not want to make a cake for a same-sex couple's wedding.
CNN  — 

Artistic expression usually isn’t a big part of discrimination cases, but it proved central to a judge’s thinking in a case out of California.

Kern County Superior Court Judge David R. Lampe ruled this week against the State of California, which took legal action against a Bakersfield baker who refused to make a wedding cake for a same-sex couple.

Tastries Bakery owner Cathy Miller told Eileen and Mireya Rodriguez-Del Rio in August that she couldn’t create a cake for their wedding because same-sex marriage clashed with her Christian faith. She instead referred them to another bakery, according to Lampe’s ruling.

Mireya Rodriguez-Del Rio filed a complaint with California’s Department of Fair Housing, which in turn sought an injunction against Miller that would force her to stop what it considered a discriminatory practice.

But Lampe ruled for Miller, saying her actions were protected by the First Amendment, because making a cake can be considered an act of artistic expression.

“The right to freedom of speech under the First Amendment outweighs the state’s interest in ensuring a freely accessible marketplace,” Lampe wrote in his ruling. “A wedding cake is not just a cake in free speech analysis. It is an artistic expression by the person making it that is to be used traditionally as a centerpiece in the celebration of a marriage. There could not be a greater form of expressive conduct.”

The couple’s lawyer said Lampe’s ruling won’t be the end of the matter.

“Bakersfield and Kern County in general is very conservative and that unfortunately includes some of the judges,” attorney Patricia Ziegler Lopez said in a statement to CNN affiliate KBAK. “But it’s not over. Our fight against bigotry and discrimination is only beginning.”

Miller told KBAK that she felt God had won in court and she’s glad society is trying to balance tolerance with free speech.

“The community and the government is starting to see that we have an issue that needs to be resolved,” Miller said. “And I think that’s really good.”

The US Supreme Court took up a similar case in December, involving a Colorado baker who refused to make a cake to celebrate a same-sex couple’s marriage because he believes that God designed marriage to be between a man and a woman.