The owner of Masterpiece Cakeshop can proceed with his lawsuit against the state of Colorado after a judge refused to dismiss the case.

Jack Phillips has accused the Colorado Civil Rights Commission of anti-religious bias because it punished him for refusing to bake a cake celebrating gender transition. Phillips, represented by Alliance Defending Freedom, filed suit when the state chose to prosecute him even after he won his case at the U.S. Supreme Court in June.

Judge Wiley Y. Daniel of the U.S. District Court for the District of Colorado ruled the suit against the state can move forward.

PENNSYLVANIA HIGH SCHOOL'S 'BIBLE BAN' IS UNCONSTITUTIONAL, STUDENTS SAY

Baker Jack Phillips

Baker Jack Phillips had refused to bake a wedding cake for a gay couple. (Alliance Defending Freedom)

“Colorado is acting in bad faith and with bias toward Jack," said ADF Senior Counsel Jim Campbell. "We look forward to moving forward with this lawsuit to ensure that Jack isn’t forced to create custom cakes that express messages in conflict with his faith.”

The Colorado Civil Rights Commission said Phillips discriminated against Denver attorney Autumn Scardina because she's transgender. Phillips' shop refused to make a cake last year that was blue on the outside and pink on the inside after Scardina revealed she wanted it to celebrate her transition from male to female.

Baker Jack Phillips poses in his Masterpiece Cakeshop in Lakewood, Colorado U.S. September 21, 2017. Picture taken September 21, 2017. REUTERS/Rick Wilking - RC1E6FC20C40

Jack Phillips, a Christian baker, was sued after he declined to create a cake for a same-sex wedding. (Reuters/Rick Wilking)

She asked for the cake on the same day the U.S. Supreme Court announced it would consider Phillips' appeal of the previous commission ruling against him. In that 2012 case, he refused to make a wedding cake for same-sex couple Charlie Craig and Dave Mullins.

The Supreme Court ruled in June that the Colorado commission showed anti-religious bias when it sanctioned Phillips for refusing to make the cake, voting 7-2 that it violated Phillips' First Amendment rights.

But the court did not rule on the larger issue of whether businesses can invoke religious objections to refuse service to gays and lesbians.

Phillips' lawsuit alleges that Colorado violated his First Amendment right to practice his faith and 14th Amendment right to equal protection. It seeks $100,000 in punitive damages from Aubrey Elenis, director of the Colorado Civil Rights Division.

Deputy Attorney General LeeAnn Morrill told Daniel that the commission did not mention religion in its latest finding against Phillips. She said the commission also has used the state's anti-discrimination law to protect people who have faced bias because of their faith.

The judge said he thought the Supreme Court's ruling had more relevance in the current case than the state acknowledged and quoted from the justices' opinions during the hearing. He mentioned now-retired Justice Anthony Kennedy's conclusion that the commission had shown "hostility" toward religion.

CHRISTIAN PERSECUTION SET TO RISE 'SHARPLY' IN 2019, GROUP WARNS

In the lawsuit, Phillips' attorneys say he "believes as a matter of religious conviction that sex — the status of being male or female — is given by God, is biologically determined, is not determined by perceptions or feelings, and cannot be chosen or changed."

It claims Phillips has been harassed and received death threats and that his small shop was vandalized while the wedding cake case made its way through the courts.