A lawsuit by a former Roman Catholic schoolteacher who says she was fired by a northern Indiana diocese for trying to get pregnant through in vitro fertilization can proceed to trial, a federal judge has ruled.

In a mixed ruling this week, U.S. District Judge Robert L. Miller Jr. in Fort Wayne said Emily Herx deserves a chance to prove her claim that her termination by the Diocese of Fort Wayne-South Bend was based on sex discrimination.

This issue “is whether Mrs. Herx was nonrenewed because of her sex, or because of a sincere belief (by the diocese) about the morality of in vitro fertilization,” Miller wrote in the 29-page ruling issued Wednesday

Herx, of Hoagland, Indiana, sued the diocese in April 2012, alleging that her firing by the diocese violated the Civil Rights Act and the Americans with Disabilities Act by discriminating against her based on gender and on infertility, which is considered a disability.

But Miller denied Herx’s claim that she was fired for her infertility, rather than the treatment itself, which is banned under Catholic doctrine.

“The Diocese appears to be exactly right: all the evidence in the record indicates that the Diocese acted because of Mrs. Herx’s choice of fertility treatment and not on any animus against infertility,” he wrote.

Part of Herx’s complaint on the sex discrimination issue was that men play a different role in the procedure and if it is successful, they don’t become pregnant, said Christopher Stake, one of the attorneys who represented Herx.

The diocese has argued that the policy against in vitro fertilization treats men and women the same. But Miller said a jury might not accept that argument.

“The Diocese hasn’t terminated any men for participation in this (or any other) infertility treatment,” he noted.

Also in the ruling, Miller spurned the diocese’s argument that, as a religious organization, it is protected from Herx’s claims.

Religious employers are not immune to federal laws against sex discrimination, he wrote.

Miller also disagreed with the diocese’s claim that Herx was a lay “minister” in the church, and therefore her termination was protected by the federal ministerial exception, which gives religious organizations leeway in the treatment of their ministers.

“Nothing in the summary judgment record suggests that Mrs. Herx was a member of the clergy of the Catholic Church,” he wrote, adding that she was considered by the principal to be a “lay teacher.”

Stake said if Herx prevails at trial on the sex discrimination claim, she can still receive the damages she seeks, such as back pay, even though the judge dismissed her disability claim.

The Associated Press left a phone message Friday seeking comment from the diocese’s attorney.

In vitro fertilization, or IVF, involves mixing egg and sperm in a laboratory dish and transferring a resulting embryo into the womb.