The first U.S. church official convicted over his handling of priest abuse complaints could leave prison after the Pennsylvania Supreme Court agreed his conviction was flawed.

Monsignor William Lynn has served nearly three years of a three-to-six year sentence for child endangerment.

Prosecutors say he helped the Roman Catholic Archdiocese of Philadelphia transfer known pedophile-priests as secretary for clergy from 1992 to 2004.

But the high court Tuesday declined to reinstate his 2012 conviction. A lower appeals court had found the trial judge allowed too much indirect testimony from other church victims.

Philadelphia prosecutors could ask to retry the 65-year-old Lynn. An office spokesman says no decision has been made.

Defense lawyer Tom Bergstrom wants his client released. He says Lynn was caught in the middle at the archdiocese.