NEWCASTLE, Australia  — An Australian appeal court on Thursday overturned a conviction against the most senior Catholic cleric ever found guilty of covering up child sex abuse.

New South Wales state District Court Judge Roy Ellis upheld former Adelaide Archbishop Philip Wilson’s appeal against his May conviction in a lower court for concealing the sexual abuse of two altar boys by a pedophile priest in the 1970s. Ellis found there was reasonable doubt that the 68-year-old cleric had committed the crime, which is punishable by up to two years in prison.

Wilson has served almost four months of a year-long home detention sentence at his sister’s house outside Newcastle. He was to become eligible for parole after serving six months.

The judge also dismissed a prosecution appeal against the leniency of the sentence.

Wilson was allowed to watch the decision via a video link from a remote location so he could avoid media cameras at the Newcastle court.

Wilson has always maintained his innocence and after his conviction had initially refused calls for his resignation until he had exhausted his appeal options. But he quit in July after then-Prime Minister Malcolm Turnbull called on the Vatican to act.

Administrator Delegate of the Adelaide Archdiocese, Philip Marshall — Wilson’s replacement — said the church noted the judgment and welcomed the conclusion of a process that had been long and painful for all concerned.

“We now need to consider the ramifications of this outcome,” Marshall said in a statement.

“The survivors of child sexual abuse and their families are in our thoughts and prayers, and the archdiocese remains committed to providing the safest possible environments for children and vulnerable people in our care,” he added.

The prosecution said that Wilson was told by two altar boys in 1976 that they had been abused by pedophile priest James Fletcher but did nothing about it. It was alleged he subsequently failed to go to the police after Fletcher was arrested in 2004 for abusing another boy.

One of the two altar boy victims, Peter Creigh, was in tears after the judge’s decision. He was too upset to comment outside court. Creigh has previously agreed to be identified in the media as a victim of child sex abuse.

Another of Fletcher’s victims who was not involved in the charge against Wilson, Peter Gogarty, said the Catholic Church had shown no genuine contrition for the abuse of children by clerics.

“I’m very disappointed as you’d expect. I’m disappointed at a personal level … but more importantly, I’m very disappointed for the other people, good, honest, reliable people,” Gogarty told reporters outside court, referring to witnesses in the trial.

Newcastle Magistrate Robert Stone “found them all very credible and very honest and those people have stood up to the might and the money of the Catholic Church and they’ve been deeply hurt by this decision. So, I feel terribly for them,” Gogarty added.

In May, Stone rejected the evidence of Wilson, who is suffering from the early stages of Alzheimer’s disease, that he could not remember the altar boys telling him of the abuse.

Fletcher was convicted in 2004 of sexually abusing another boy and died of a stroke in prison in 2006.

The defense lawyers had argued Wilson was not guilty because the evidence was circumstantial and there was no evidence to prove beyond a reasonable doubt the clergyman was told about the abuse, believed it was true or remembered being told about it.

During Wilson’s two-day appeal last week, prosecutor Helen Roberts urged Ellis to consider how the magistrate had the benefit of watching both Wilson and Creigh — the main witness — during the trial. The magistrate had raised doubts about the cleric’s credibility before finding him guilty.

Stone found Creigh had been a genuine and truthful witness who had no motive to make up the conversation he said he had with Wilson in 1976.

But Ellis repeatedly stated during the appeal that Wilson was an intelligent, articulate man who appeared to be doing his best to answer questions put to him during the trial.

Ellis said he was not bound by the magistrate’s conclusion that many of Wilson’s answers were “dissembling and contrived.”

When sentencing Wilson to home detention, Stone said the cleric had shown no remorse or contrition for the cover-up and his primary motive had been to protect the Catholic Church.