The government must stay out of hiring and firing decisions by a religious organization, even if a minister sues for employment discrimination, the Supreme Court ruled on Wednesday.

Religious freedom groups praised the decision, and especially the fact that it came from a unanimous court.

"The fact that the court was unanimous underlines how essential a part of religious liberty is the principle that churches and synagogues get to select their religion teachers," said Jay Sekulow of the American Center for Law and Justice. "Government has no business deciding who should or should not carry out religious ministry, and we're delighted the high court reached that conclusion."

The case stemmed from the firing of Cheryl Perich, a Michigan teacher who had been employed by a school run by the Hosanna-Tabor Evangelical Lutheran Church.

Perich had completed training to become a commissioned minister at the school. In 2004 she became ill with narcolepsy and went on disability. School officials expressed concern that Perich would not be able to return to the school for several months. The congregation voted to pay a portion of her health insurance premiums in exchange for her resignation. Perich refused to step down and returned to work, only to be told she must leave and that she would likely be fired.

Perich told the school that she had consulted a lawyer and intended to assert her legal rights. She contacted the federal Equal Employment Opportunity Commission, which filed suit arguing Perich's termination was in violation of the Americans With Disabilities Act.

But the court ruled today the case could not go forward.

Chief Justice John Roberts, writing for the court, said that the Religion Clauses of the First Amendment -"Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof"-bar the government from interfering with the decision of a religious group to fire one of its ministers.

Roberts gave a history lesson in his opinion, noting that "controversy between church and state over religious offices is hardly new." He noted that the founders sought to foreclose the possibility of a national church.

"The Establishment Clause prevents the government from appointing ministers," Roberts said, and the "Free Exercise Clause prevents it from interfering with the freedom of religious groups to select their own. "

"The Supreme Court made clear today that religion is special, " said Luke Goodrich of the Becket Fund for Religious Liberty, a group that defended the Hosanna-Tabor Evangelical Lutheran Church in court.

"A religious school under the Constitution is not the same as a secular school. When a religious school chooses who is going to teach the faith to the next generation, it doesn't have to look over its shoulder to see if the government is going to second-guess that choice, " said Goodrich.

The court had harsh criticism for the government's argument that a church should be treated no differently from a labor union or a social club when it came to the organization's freedom to choose its leaders.

"We cannot accept the remarkable view that the Religion Clauses have nothing to say about a religious organization's freedom to select its own ministers, " Roberts wrote.

The Rev. Barry W. Lynn, the executive director of Americans United for Separation of Church and State, said he thought in today's ruling the Court had gone too far.

"If you are declared a minister by a religious organization, you are out of luck if you have a claim for discrimination even if it's based on race, gender or any other non religious factor," Lynn said. "This effectively blocks almost any kind of serious challenge to an adverse employment decision. "

Roberts said that while the interest of society in the enforcement of employment discrimination statutes is important, "so too is the interest of religious groups in choosing who will preach their beliefs, teach their faith, and carry out their mission."

He said, "When a minister who has been fired sues her church alleging that her termination was discriminatory, the First Amendment has struck the balance for us. The church must be free to choose those who will guide it on its way."