Msgr. William J. Lynn returned to a Philadelphia courtroom Thursday, four years older and a lot thinner than when he left to serve three to six years in prison for his conviction in the Catholic Church clergy sex abuse scandal.

Two Pennsylvania appeals courts have erased Lynn's child endangerment conviction, although they are powerless to give back 33 months in prison.

But for the 65-year-old former secretary for clergy - the first Catholic Church official in the nation convicted for the way he supervised pedophile priests - freedom on $250,000 bail is the only clearing in a legal cloud that has shadowed him since 2002.

Still ahead, on May 1, is another public trial in Philadelphia Common Pleas Court, on a charge of child endangerment, and the potential of another conviction and return to custody.

After Lynn was released Tuesday, defense lawyer Thomas A. Bergstrom criticized District Attorney Seth Williams for revisiting the case against Lynn.

Bergstrom called the case against Lynn "over the top, inaccurate and dishonest" and said Williams was "just hell-bent on trying this case. . . . For some reason, he continues to want to beat up on this guy."

"He's done 33 months along with 18 months' house arrest for something the Superior Court has now ruled was an unfair trial," Bergstrom said.

Bergstrom has argued that Lynn, who was secretary for clergy from 1992 to 2004, was made a scapegoat for the church. In his first trial, Lynn testified that he was responsible for investigating allegations against priests and recommending action, but that the final decision was the archbishop's for him to carry out.

Still, Lynn's pivotal position in the church hierarchy was important enough that the archdiocese has funded his defense from his first appearance before a grand jury in 2004, through a second grand jury, trial and two rounds of appeals to the Supreme Court to the present.

Williams, in an interview last week after Lynn's release, said he has no doubts about retrying Lynn. Williams said that in his role as secretary for clergy Lynn "helped create a playbook for handling someone who alleges that an archdiocesan priest is a pedophile."

Williams said the Superior Court's criticism of the 2012 trial was about the volume of historical cases, not the quality of the evidence against Lynn.

"I think we had sufficient evidence at the first trial for him to be found guilty by a jury beyond a reasonable doubt," Williams said. "I wouldn't bring this case if I didn't feel I could prove him guilty."

The Superior Court ruled that the volume of historical cases - two dozen dating to 1940 detailing how the Archdiocese of Philadelphia handled allegations of child sexual abuse by priests - was overkill.

Prosecutors argued that the historical cases were needed for the jury to understand how Lynn was a member of a deep-seated church culture of ignoring victims and covering up for deviant priests.

But the Superior Court panel, in a 2-1 decision, called the volume of case files too much and said they tainted the jury's ability to fairly reach a verdict.

So what will Lynn's second trial look like?

It will likely be shorter than the 2012 trial, which had 13 weeks of testimony followed by 121/2 days of deliberations by the jury. The in-court review of the historical cases consumed much of the trial.

"We could try this case in a week without them," Bergstrom said, referring to the old cases from the archdiocese's "Secret Archives."

A week may be too optimistic.

Assistant District Attorney Brian Zarallo told Common Pleas Court Judge Gwendolyn N. Bright at a scheduling hearing Thursday that the Superior Court did not prevent prosecutors from using some historical cases.

"We have to decide which cases will be litigated," said Zarallo.

Zarallo speculated that the retrial would last about three to four weeks.

It is also more likely that the retrial will focus more on a single, problematic allegation of child sexual abuse.

Lynn was accused of child endangerment for allowing the Rev. Edward V. Avery, who had a history of sexually abusing children, to live in the rectory of St. Jerome Catholic Church in Northeast Philadelphia. There, Avery was accused of assaulting a 10-year-old altar boy in 1999.

According to the 2011 grand jury report, the boy - identified in court by the pseudonym "Billy Doe" - was molested by Avery, the late Rev. Charles Engelhardt, and parochial school teacher Bernard Shero during the 1998-99 school years.

In March 2012, Avery pleaded guilty to the charges involving the boy and was sentenced to 21/2 to 5 years in prison. He's still there, at age 73, in the Laurel Highlands state prison in Western Pennsylvania.

But in January 2013, called as a witness at Engelhardt's and Shero's trial, Avery recanted his guilty plea. He said he didn't know his accuser, Engelhardt or Shero and pleaded guilty only to escape a longer prison term.

The accuser of the three men testified at both trials.

In Lynn's trials, Bergstrom did not question the man, perhaps because he was warned by Common Pleas Court Judge M. Teresa Sarmina that he could force her to tell the jury about Avery's guilty plea on the eve of the trial.

At Engelhardt's and Shero's trial, the accuser was aggressively questioned by defense lawyers, who hammered his history of drug use, lies and crime and discrepancies between his initial statements to police and church investigators and his trial testimony.

The accuser, now 28, maintained that his drug and emotional problems were the result of being molested. He denied that he was trying, as the defense claimed, to "score a payday" suing the archdiocese.

All three were found guilty. Englehardt died in prison in 2014 at age 67, still appealing his conviction and his six- to 12-year prison sentence. Shero, 53, is serving eight to 16 years in the state prison at Houtzdale.

In Lynn's retrial, prosecutors will have to decide what to do about Avery and revelations about his accuser since the man testified in 2012 and 2013.

Bergstrom said he now has reports from investigators and forensic psychiatrists - not available to him at Lynn's trial - who concluded that the accuser's allegations of abuse were not believable.

Bergstrom said he will also be able to question the accuser about the terms of the confidential settlement of his lawsuit against the archdiocese that was reached last summer.