The U.S. Supreme Court unanimously agreed Wednesday that the government should not interfere with religious groups’ internal affairs in the case of a disgruntled former employee of a Lutheran school.

Chief Justice John Roberts wrote in the majority opinion for Hosanna-Tabor Evangelical Lutheran Church and School v. Equal Employment Opportunity Commission that allowing the EEOC’s anti-discrimination lawsuit violated the Free Exercise clause of the First Amendment.

"Such action interferes with the internal governance of the church, depriving the church of control over the selection of those who will personify its beliefs," Roberts wrote. "By imposing an unwanted minister, the state infringes the Free Exercise Clause, which protects a religious group's right to shape its own faith and mission through its appointments."

The 9-0 ruling in favor of Hosanna-Tabor Evangelical Lutheran Church is a huge relief for religious freedom proponents.

“The message of today’s opinion is clear: The government can’t tell a church who should be teaching its religious message,” Luke Goodrich, a deputy national litigation director at The Becket Fund for Religious Liberty, said in a statement.

“This is a huge victory for religious freedom and a rebuke to the government, which was trying to regulate how churches select their ministers.”

Cheryl Perich, a former teacher at the Hosanna-Tabor Evangelical Lutheran Church and School, is the “minister” in question.

She was laid off after taking an extended leave for health reasons. The school made the decision, citing ministerial exception. Ministerial exception allows religious institutions the freedom to select their ministry employees without government intrusion.

The EEOC argued that Perich was a secular employee at the school who taught from secular books and was therefore eligible to seek correct action against the school.

The Americans With Disabilities Act of 1990 prohibits employers from discriminating against qualified individuals with disabilities.

Perich took her case to the EEOC and the government agency sued the school. The district court dismissed the suit, recognizing a ministerial exception to the Disabilities Act, which prevents interference from the courts when it comes to employment matters in a religious institution.

But the Sixth Circuit later reversed the decision, concluding that that ministerial exception does not apply to the former employee because she spent a majority of her time performing “secular” duties.

Americans United for Separation of Church and State Executive Director the Rev. Barry W. Lynn expressed disappointment in the ruling.

“Clergy who are fired for reasons unrelated to matters of theology – no matter how capricious or venal those reasons may be – have just had the courthouse door slammed in their faces,” Lynn said in a statement.

While Perich did teach non-religious subjects, she also led prayer and devotion several times a day. Douglass Laycock, who argued the case for Hosanna-Tabor, told The Associated Press the ruling is a “huge win for religious liberty.”

Laycock continued, “The court has unanimously confirmed the right of churches to select their own ministers and religious leaders.”