PHILADELPHIA — A former Philadelphia church official imprisoned over his handling of abuse complaints is seeking bail after Pennsylvania’s highest court granted him a new trial.

Monsignor William Lynn is the first person ever charged and convicted of helping the Roman Catholic Church shield child molesters within its ranks. He served from 1992 to 2004 as the Secretary for Clergy of the Archdiocese of Philadelphia, under the late Cardinal Anthony Bevilacqua, and had been accused in 2012 of conspiring to cover up abuse charges against priests under his supervision.

Appeals courts have wrestled ever since with the legality of his conviction. It came after a scathing grand jury report accused Lynn and other officials in thew archdiocese of playing down credible charges against several priests, and of acting to protect institutional interests rather than children.

Lynn has been in and out of prison as the courts have twice thrown out his conviction. He’s served nearly three years of a three- to six-year sentence, and is due to be paroled in October.

Defense lawyer Thomas Bergstrom plans to ask a judge on Tuesday to release the 65-year-old Lynn.

Prosecutors have not said whether they hope to retry the longtime secretary for clergy.