Updated

The Supreme Court ruled in a 7-2 decision on Wednesday that civil courts cannot get involved in employment discrimination claims brought against religious organizations where the employee served a religious function.

The decision expanded on a previous ruling from 2012 which said that religious organizations have a “ministerial exception” from employment discrimination lawsuits, but it was unclear exactly who qualifies as a “minister.

SUPREME COURT RULES IN FAVOR OF LITTLE SISTERS OF THE POOR IN OBAMACARE CONTRACEPTION CASE

"The religious education and formation of students is the very reason for the existence of most private religious schools, and therefore the selection and supervision of the teachers upon whom the schools rely to do this work lie at the core of their mission," Justice Samuel Alito wrote in the court's opinion. "Judicial review of the way in which religious schools discharge those responsibilities would undermine the independence of religious institutions in a way that the First Amendment does not tolerate."

The decision covered two cases involving teachers at religious schools who claimed that they were discriminated against. In one, Agnes Morrissey-Berru alleged that a Roman Catholic school in Los Angeles did not renew her contract because of her age. She taught a variety of subjects, including religion, but did not have any religious training or title prior to working there. She did take religious education classes at the school's request once she was working there, and prayed with students.

In the second case, Kristen Biel -- who has since died -- claimed that she was let go from another Los Angeles Catholic school because she asked to take leave due to breast cancer treatment. She too taught multiple subjects including religion and prayed with students, despite not having a formal religious title.

The Supreme Court ruled that despite not officially being members of the clergy, the "ministerial exception" applied to their claims because they both taught religion and had contracts that included clauses that referenced obligations to uphold the religious missions of their schools.

"The independence of religious institutions in matters of 'faith and doctrine' is closely linked to independence in what we have termed ‘matters of church government.’” Alito wrote. "This does not mean that religious institutions enjoy a general immunity from secular laws, but it does protect their autonomy with respect to internal management decisions that are essential to the institution’s central mission. And a component of this autonomy is the selection of the individuals who play certain key roles."

CHIEF JUSTICE ROBERTS INJURED HEAD IN FALL LAST MONTH, WAS HOSPITALIZED

The court said that the "ministerial exception" does not just apply to clergy despite its phrasing, because religious organizations have the right to independently determine who gets to play "key roles" regardless of whether they are actual ministers.

"Take the question of the title 'minister,” Aliton wrote. "Simply giving an employee the title of 'minister' is not enough to justify the exception. And by the same token, since many religious traditions do not use the title 'minister,' it cannot be a necessary requirement. Requiring the use of the title would constitute impermissible discrimination, and this problem cannot be solved simply by including positions that are thought to be the counterparts of a 'minister,' such as priests, nuns, rabbis, and imams."

The court's opinion went on to say that "attaching too much significance to titles would risk privileging religious traditions with formal organizational structures over those that are less formal."

"What matters, at bottom, is what an employee does," the court said.

CLICK HERE TO GET THE FOX NEWS APP

In a concurring opinion Justice Clarence Thomas -- joined by Justice Neil Gorsuch -- stated that civil courts should simply "defer to religious organizations’ good-faith claims that a certain employee’s position is 'ministerial'" because "judges lack the requisite 'understanding and appreciation of the role played by every person who performs a particular role in every religious tradition.'”

Justice Sonia Sotomayor wrote a dissenting opinion, in which Justice Ruth Bader Ginsburg joined. She argued that because the teachers "taught primarily secular subjects, lacked substantial religious titles and training, and were not even required to be Catholic," the ministerial exception should not apply to them.