The First Amendment protects religious organizations from facing age discrimination lawsuits brought by teachers at religious schools, the state’s highest court ruled Wednesday.

The Supreme Judicial Court dismissed a workplace discrimination claim brought in 2008 by Gaye Hilsenrath against Temple Emanuel in Newton after she lost her part-time job at the temple-run Rabbi Albert I. Gordon Religious School.

The court ruled that the temple’s teacher hiring decisions were protected under “ministerial exceptions’’ to anti-discrimination laws because of the First Amendment’s ban on state intrusion into religious decisions.

Advertisement - Continue Reading Below

Hilsenrath “taught religious subjects at a school that functioned solely as a religious school, whose mission was to teach Jewish children about Jewish learning, language, history, traditions, and prayer,’’ Justice Ralph Gants wrote for the unanimous court.

“Where a school’s sole mission is to serve as a religious school, the State should not intrude on a religious group’s decision as to who should [and should not] teach its religion to the children of its members,” Gants wrote.

“The fundamental question is whether it would infringe the free exercise of religion or cause excessive entanglement between the State and a religious group if a court were to order a religious group to hire or retain a religious teacher that the religious group did not want to employ, or to order damages for refusing to do so. We conclude that it would,” he wrote.

Hilsenrath could not immedately be reached for comment on Wednesday.

She had filed a complaint with the Massachusetts Commission Against Discrimination. The anti-discrimination agency began an investigation of her allegations until a Superior Court judge ordered it stopped as an unconstitutional intrusion into the operation of a religious organization.

The high court ruled that the lower court judge had moved too soon, but then went on to address the constitutional issue — and found in the temple’s favor.

Gants wrote that Massachusetts would follow the lead of a recent US Supreme Court decision and would not limit the ministerial exception to only ordained ministers, rabbis, or priests.

In Massachusetts, he wrote, “the ministerial exception applies to the school’s employment decision regardless whether a religious teacher is called a minister or holds any title of clergy.”

Barbara Green, spokeswoman for the agency, said the commissioners and legal staff were in an all-day training session on Wednesday, and have not yet had a chance to review the ruling.