In the age of transgenderism, the right to medically transition is threatening some of the most basic freedoms we’ve known, such as religious freedom.

Consider a recent case out of California, where a state appeals court ruled that a transgender man can move forward with a lawsuit suing a Catholic hospital for discrimination.

In April 2017, Evan Minton sued Catholic medical provider Dignity Health after one of its hospitals refused to give her a desired hysterectomy, because doing so would have contradicted Catholic teachings against sterilization.

Originally, the San Francisco Superior Court ruled in Dignity Health’s favor and dismissed the case on the basis that Minton received the desired procedure from another Dignity Health hospital with a less restrictive policy.

But now, a state appeals court has reversed that decision, and tossed the case back to a lower court.

This could pave the way for any person, via the court, to compel a religious organization to violate its religious convictions.

As one might expect, Minton applauded the decision.

“I feel that this appeals court let [Dignity Health] know that they can’t do that, that they have to treat transgender people with dignity and care. That means the world to me,” he told KCRA, a local news channel.

Minton added: “The fight’s not over because what this appeals court has done has affirmed transgender people, but now we go back to the Superior Court and we make our case there.”

In 2016, Minton scheduled a hysterectomy with a surgeon at the hospital to aid in the transition process from female to male. A couple days before the surgery was set to occur, the hospital became aware of the situation and cancelled the procedure, citing its core religious beliefs.

In a statement last week following the appeals court decision, the hospital said, “Catholic hospitals do not perform sterilizing procedures such as hysterectomies for any patient regardless of their gender identity, unless there is a serious threat to the life or health of the patient.”

Even though Dignity Health offered to find another hospital willing to do the hysterectomy, and another non-Catholic, Dignity Health hospital ended up doing the procedure, Minton went forward with the lawsuit.

With the help of the ACLU, Minton filed a lawsuit against Dignity Health claiming that it had denied medical care on the basis of gender identity, which he said qualified as “sex discrimination in violation of California’s Unruh Civil Rights Act.”

But this is not what actually occurred.

Dignity Health did not deny Minton care on the basis of gender identity; it simply refused to carry out the sterilization procedures it considered harmful, and would never perform on any patient.

Dignity Health’s faith-based policy means its doctors vow to “protect and preserve the bodily and functional integrity” of patients, and that the patient’s “functional integrity … may only be sacrificed to maintain the health or life of the person when no other morally permissible means is available.”

As such, Dignity Health forbids sterilization procedures since they go against Catholic moral teachings about what is good and conducive to flourishing.

The Court of Appeals decision is especially egregious because it acknowledges Dignity Health’s religious freedom as a Catholic hospital, but goes so far as to say the exercise of that freedom in this case—particularly under California law—amounts to discrimination.

To provide a sampling, the court wrote:

The pleading alleges that Mercy allows doctors to perform hysterectomies as treatment for other conditions but refused to allow Dr. Dawson to perform the same procedure as treatment for Minton’s gender dysphoria, a condition that is unique to transgender individuals.

Denying a procedure as treatment for a condition that affects only transgender persons supports an inference that Dignity Health discriminated against Minton based on his gender identity. This is true even if the denial was pursuant to a facially neutral policy.

Another portion of the ruling essentially states that forcing the hospital to violate its religious principles does not actually violate its free exercise of religion because California has a “compelling interest in ensuring full and equal access to medical treatment,” which purportedly supersedes any religious liberty claims and makes any compulsion claim null and void.

This not only seems like a blatant violation of the free exercise clause, but would pave the way for courts to violate all kinds of organizations’ religious rights if the state holds there is a greater interest at stake than religious liberty.

It remains to be seen how this case will shake out—and whether federal courts will pick it up and, perhaps, strike down the state court’s ruling.