The U.S. Court of Appeals for the Fourth Circuit on Wednesday declined to expand a statutory shield for religious institutions facing job discrimination lawsuits, instead upholding a Catholic school’s decision to fire a gay teacher under what legal experts called a broad interpretation of a First Amendment defense.

In a split decision, Judges Pamela Harris and Paul Niemeyer said English and drama teacher Lonnie Billard’s job at Charlotte Catholic High School included duties that qualified him as a minister. Thus, the First Amendment’s ministerial exception—embodied in the free exercise of religion—protected the school from liability, the judges held.