PHILADELPHIA Msgr. William J. Lynn left a Philadelphia court Monday afternoon free on bail, after spending more than 18 months behind bars for a now-overturned conviction.

Surrounded by supporters and wearing clerical garb, a noticeably slimmer Lynn smiled and embraced relatives after the hearing before Common Pleas Court Judge M. Teresa Sarmina.

Sarmina, the judge who presided over Lynn's three-month trial last year and sentenced him to three to six years in prison, told the monsignor she would keep a signed arrest warrant on file in case Lynn violated the terms of his release.

"I just wanted to make sure you understood that," Sarmina told him.

The hearing, the first public appearance for the former Archdiocese of Philadelphia administrator since his sentencing last year on child-endangerment charges, lasted less than five minutes. It included none of the fireworks of last week's bail hearing, when prosecutors sparred with Lynn's attorney over whether Lynn was a flight risk.

Assistant District Attorney Patrick Blessington sat silently through most of Monday's proceeding.

Sarmina agreed to free Lynn on bail after a Superior Court panel concluded that she and the Philadelphia District Attorney's Office had misapplied the state child-endangerment law in prosecuting him. District Attorney Seth Williams is appealing that decision to the state Supreme Court.

As the hearing ended, the 63-year-old Lynn declined to comment on anything but his 80-pound weight loss. Asked how he shed the weight during his prison stint, he responded: "Taking care of myself and exercising."

The Archdiocese of Philadelphia, which last week posted the $25,000 necessary for his bail, has also given him a place to stay during the appeal: the rectory of St. William, a parish in the Lawncrest section of Northeast Philadelphia.

The parish has no school. Lynn spends most of his time confined to the building, said his lawyer, Thomas Bergstrom.

While on bail, Lynn must submit to electronic monitoring, report weekly to a probation officer, and remain in the area. Lynn is on administrative leave, and the archdiocese has declined to say whether he could return to active ministry.

Bergstrom said Monday that he would file a complaint to the state Bar Association and the Disciplinary Board of the state Supreme Court about the district attorney's remarks in recent weeks. Williams has said he was "disgusted" by the appellate court's decision to overturn Lynn's conviction, and publicly criticized the archdiocese for paying Lynn's bail.

"I thought it was inappropriate," Bergstrom said. "He shouldn't be out there denigrating the court and denigrating the archdiocese."

As Lynn left the Criminal Justice Center on Monday, he was surrounded by television cameras and was heckled by passersby who noticed his collar and taunted him with shouts of "Pedophile" and "Keep him away from my children."

Lynn has never been accused of abusing a child. But as the administrator who supervised and recommended priests' assignments, he was the first Catholic Church official in the country to be tried and imprisoned for crimes related to clergy sex abuse.

A jury found him guilty of endangering children in the late 1990s by allowing a sexually abusive priest to live and celebrate Mass at a Northeast Philadelphia parish where the priest later assaulted an altar boy.

The Superior Court panel reversed the conviction, finding that prosecutors and the judge had misapplied the state's child-endangerment law when they prosecuted Lynn. Not until 2007 could supervisors such as Lynn be held criminally responsible under the law, the higher court found.