PHILADELPHIA (AP) — Despite losing on appeal twice, Philadelphia's district attorney said Monday he will continue to fight to keep a Roman Catholic church official who will soon be eligible for parole in prison over his handling of sex-abuse cases.

District Attorney Seth Williams filed an application for the full nine-member state Superior Court to rehear the case against Monsignor William Lynn. Last week, a three-judge panel of the court overturned Lynn's conviction in a 2-1 decision and awarded him a new trial.

Lynn, 64, was convicted in 2012 of endangering a policeman's son who said he was sexually assaulted as a boy by two priests and a teacher — including a previously accused priest who had been transferred to the boy's parish. Lynn has been imprisoned off and on amid a wild legal journey.

He was the first church official ever charged over his handling of abuse complaints.

"My office will continue to use all its resources to ensure that Monsignor Lynn remains in state custody," Williams said during a news conference at his office, adding that the Superior Court has not yet addressed all 10 issues raised by Lynn in his appeal.

Lynn returned to prison in April, when a conviction overturned in 2013 on different grounds was reinstated by the state Supreme Court. His attorney filed a petition for bail last week, but it has not yet been heard.

In their ruling Tuesday, the appellate judges said the trial judge erred in allowing weeks of testimony from 21 accusers not directly connected to this case to show how the Philadelphia Archdiocese handled sex-abuse complaints. Prosecutors disagree, countering that such evidence was necessary to show Lynn's "pattern and practice of concealment and protection of child-sexual-predator priests."

If his latest action is unsuccessful, Williams said he is prepared to go to the state Supreme Court and would proceed with a new trial, but added that he does not want to prolong the case and cause further pain to the families affected.

Lynn has already served about two years of his three- to six-year prison term. Under state law, he must serve at least half of his sentence, but would be eligible for parole at that point and could be released.

Lynn's attorney, Thomas Bergstrom, said Monday he has seen the filing, which was expected.

"It's part of the process, if you want to continue to fight this battle," Bergstrom said in a telephone interview. "I'm not so sure the court is going to be willing to take it. At some point, it just seems to be a little much. Are we going to fight this forever? I hope not."

The court has 60 days to address Williams' application.