he state's highest court yesterday ruled that an Episcopal priest cannot sue his church for publicly accusing him of immoral conduct, a decision that could effectively insulate the Archdiocese of Boston from defamation claims for identifying clergy members accused of sexual abuse.

In a unanimous ruling, the Supreme Judicial Court dismissed a civil defamation suit the priest had filed against the Episcopal Diocese of Massachusetts, two church officials, and a parishioner who said he had an extramarital affair with her.

The high court said civil courts are prohibited by the First Amendment, which protects religious freedom, from interfering in internal disputes over church discipline.

''We are bound to step aside,'' Justice Francis X. Spina wrote for the court. ''The assessment of an individual's fitness to serve as a priest is a particular ecclesiastical matter.''

Spina also wrote that church leaders may notify their parishioners and the public when allegations of sexual misconduct are made against a clergy member.

''The Episcopal Church, like others, has a singular interest in protecting its faithful from clergy who will take advantage of them,'' Spina wrote.

Lawyers said yesterday the SJC decision signals that priests targeted in the ongoing sexual abuse scandal enveloping the Catholic Church will have little recourse in the civil courts if they are eventually cleared of any wrongdoing.

Since February, Cardinal Bernard F. Law has removed 19 priests from ministry based upon allegations that they had molested children. The archdiocese has yet to exonerate any of the accused priests.

''Some priests might get falsely accused in this climate,'' said David Yas, a lawyer and editor of the Massachusetts Lawyer's Weekly newspaper. ''If those priests look for satisfaction in the courts, they might get turned away as a result of this decision.''

Yesterday's SJC ruling came in the case of former Rev. James R. Hiles, who sued the Episcopal Diocese of Massachusetts and two church leaders for suspending him after a female parishioner told church leaders she had a five-year sexual relationship with Hiles, while he was married.

Hiles, who was ordained in 1958, was removed as rector of St. Paul's Episcopal Church in Brockton.

Linda M. Hastie, who made the allegations in a 1996 letter to Bishop M. Thomas Shaw III and Bishop Barbara C. Harris, said the affair ended in 1975.

Hiles said the allegations were fabricated by the church because he was locked in a dispute with Shaw over the disposition of a $2 million bequest a parishioner had given to St. Paul's. Shaw insisted the money be turned over to the diocese, an idea Hiles would not endorse during a tense meeting between the two men in late 1995, according to the lawsuit.

In the wake of Hastie's allegations, Shaw ordered him not to disclose the identity of his accuser to anyone outside of the church hierarchy and suspended him from his duties. Church leaders notified other priests about Hiles's suspension and publicly disclosed the suspension to the press, according to court records.

In May 1996, Hiles and his wife, Lauretta, sued Hastie and church leaders. Hiles denied having a physical relationship with Hastie and sued her for defamation, accusing her and church leaders of conspiring to destroy his reputation.

Superior Court Judge Wendie I. Gershengorn dismissed the bulk of Hiles's lawsuit on First Amendment grounds, but last year the Appeals Court said Hiles should have the right to pursue his defamation suit against Hastie.

The SJC said Hiles couldn't sue Hastie either, and the case, except for allegations that a bishop assaulted Hiles by throwing a pen at him, must end.

''The First Amendment's protection of internal religious disciplinary proceedings would be meaningless if a parishioner's accusation ... could be tested in a civil court,'' Spina wrote. Hastie had made her allegation directly to church officials, so they were considered part of the internal procedure.

The court said Hiles, by joining the church as a minister, had agreed to be bound by church doctrine.

''Matters arising out of the church-minister relationship, including church discipline, come within the category of religious belief and thus are entitled to absolute [First Amendment] protection,'' Spina wrote.

Hastie's lawyer, Clyde Bergstresser, said yesterday that his client feels vindicated by the SJC decision in her favor. He also said the ruling should make victims of clergy abuse feel confident they will not face a retaliatory lawsuit should they seek help from their church leaders.

He added: ''I think in this day when we are seeing so many charges against the Catholic Church for its apparent failure to follow appropriate procedures, the paradox in that circumstance is that the parishioners had to go to civil courts'' before church leaders would help.

Hiles's lawyer, Stephen C. Hoctor, did not return several telephone calls seeking comment yesterday. Hiles also could not be reached for comment.

The attorney for the Episcopalian Diocese and church leaders, William F. Looney Jr., said the SJC used a well-traveled legal path to reach its conclusions.

''It's been the law for a long time that where there are disputes between a priest and a bishop over matters involving faith and morals and church rules, that the bishop is the man who has the authority, and the civil courts will not involve themselves,'' Looney said.