WASHINGTON  — A federal appeals court July 9 dismissed a lawsuit filed against a Chicago Catholic parish and the Chicago Archdiocese by a former parish music director.

The 7th U.S. Circuit Court of Appeals in a 7-3 en banc, or full court, decision, said the plaintiff’s claim against St. Andrew the Apostle Parish fell under the ministerial exemption that protects religious organizations from discrimination lawsuits by parish employees.

The former employee, Sandor Demkovich, claimed in his 2016 lawsuit that his parish priest subjected him to a hostile work environment because of his disability, including metabolic syndrome — a group of conditions that increase the risk of heart disease, stroke and diabetes. He also said he had been harassed and fired because of his same-sex marriage.

A district judge dismissed the same-sex marriage discrimination claim on the grounds that the church had a religious basis for its decision, but it allowed the disability claim to go forward. Then last year, a 7th Circuit panel upheld Demkovich’s disability claim and also revived the same-sex marriage discrimination claim, which prompted the church and the archdiocese to seek a review by the full panel of 11 judges.

The court agreed, with one judge recused, and heard arguments in the case this February.

In its July ruling, reversing its previous decision to revive the discrimination claim, the court stressed that a ministerial exception protects the entire ministerial relationship and not just during hiring or firing of an employee.

Circuit Judge Michael Brennan, writing for the majority, said the decision was based on the Supreme Court’s interpretation of ministerial exception last year when it ruled that Catholic school teachers who also taught religion could not sue for wrongful termination.

Brennan wrote that “religion permeates the ministerial workplace in ways it does not in other workplaces” and he added that “the contours of the ministerial relationship are best left to a religious organization, not a court.”

The dissent, written by Circuit Judge David Hamilton, stressed that ministerial exceptions should be evaluated on case by case basis instead of following an overall standard that that applies “regardless of how severe, pervasive, or hostile the work environment is, regardless of whether the hostility is motivated by race, sex, national origin, disability, or age, and regardless of whether the hostility is tied to religious faith and practice.”

He also said the majority opinion in this decision focused “too much on religious liberty and too little on counterarguments and other interests” and ended up moving the law “beyond necessary protection of religious liberty.” He wrote that it gave religious institutions “a constitutional shelter from generally applicable laws at the expense of the rights of employees.”

Daniel Blomberg, senior counsel at Becket, the religious liberty law firm, which was one of the firms that represented the Chicago Archdiocese in this case, said the ruling upholds key First Amendment principles in church and state interactions.

He also said it reminds the lower courts: “we cannot lose sight of the harms — civil intrusion and excessive entanglement — that the ministerial exception?prevents.”

“Worship is sacred. That’s why worship leaders who select and perform elements of worship are ministers of the faith, conveying its teachings to the faithful,” he said.

“That’s also why the church — not the state — gets to make sure that its music ministers are directing its congregation in a way that’s faithful to its beliefs,” he added.