A defrocked Philadelphia priest pleaded guilty Thursday to conspiracy and sexually assaulting a 10-year-old altar boy, four days before he and two priests were to face the start of a landmark trial about clergy sex-abuse in the Archdiocese of Philadelphia.

Edward V. Avery, 69, was sentenced to 21/2 to five years in prison under an agreement with the Philadelphia District Attorney's Office.

It was unclear how the sudden plea would affect the trial, scheduled to start Monday, or if Avery would become a witness for the commonwealth. Citing a gag order, prosecutors said they could not comment.

But Avery's decision could increase pressure on his codefendants, the Rev. James J. Brennan and, in particular, Msgr. William J. Lynn. As the archdiocese's former secretary for clergy, Lynn is the first church official nationwide to be charged with covering up or enabling child sex abuse by priests.

Under questioning by Assistant District Attorney Patrick Blessington, Avery admitted conspiring with Lynn and others to endanger children. He also pleaded guilty to involuntary deviate sexual intercourse for assaulting the Northeast Philadelphia boy in 1999.

Asked by Common Pleas Court Judge M. Teresa Sarmina if he felt he had to plead guilty, Avery paused, then said: "It's something I have discussed and decided to do."

A lawyer for Avery's victim said prosecutors had notified the young man before the plea Thursday. "He is very relieved," said the lawyer, Slade McLaughlin.

An amateur disc-jockey once known as "the Smiling Padre," Avery was ordained in 1970 and served in seven parishes across the Philadelphia region. In 1992, he was pastor of a Mount Airy church, St. Therese of the Child Jesus, when a medical school student reported to Lynn that Avery had molested him when both were at a Pennsburg, Montgomery County, parish in the 1970s.

Avery was removed from St. Therese and quietly sent to St. John Vianney, an archdiocesan-owned hospital that evaluated and treated priests accused of sexual misconduct.

Prosecutors have said Lynn later tried to quash rumors about the reason for Avery's removal, assuring one parishioner in a letter: "There have never been anything but compliments heard in this office about Father Avery."

After Avery's hospital discharge in 1993, Cardinal Anthony J. Bevilacqua assigned him to live at St. Jerome's and work as a chaplain at nearby Nazareth Hospital. Lynn, whose duties included investigating priests accused of misconduct, was supposed to be part of an after-care team monitoring Avery.

In 2003, Bevilacqua approved an inquiry into the medical student's abuse allegations. Three years later, Avery was defrocked. At the time of his removal, he had complained it was because of one outdated and unsubstantiated allegation against him.

But prosecutors said at least two more men had come forward to accuse Avery of sex abuse since he, Lynn, and three others were charged last year. Two of the defendants, the Rev. Charles Engelhardt and former schoolteacher Bernard Shero, are awaiting separate trials on charges that they molested the same St. Jerome's altar boy in the late 1990s.

At his plea hearing Thursday, Avery sat alongside defense lawyer John P. Donohue, who asked the judge to consider Avery's decades of community service as a priest.

"In the end, every human being proceeds on this Earth as a flawed human being," Donohue said. "Father Avery has made some horrible mistakes in his life."

At a hearing Monday, another of Avery's lawyers, Michael Wallace, had portrayed the victim as a drug-addled criminal who made up the allegation to rationalize his drug use and get a payout. "It's a fabrication," Wallace said then.

McLaughlin, who represents the victim in a civil suit against the archdiocese, called such rhetoric "disgraceful" and said the plea was vindication. "I'd like to see an apology now for the things that have been said about my client," he said.

McLaughlin said the former altar boy had been prepared to testify, and could still be called as a witness if the trial starts as planned.

Lynn and his lawyers are due back in court Friday for another pretrial matter. Awaiting trial with him is Brennan, who is charged with raping a boy in 1996.

Both have pleaded not guilty.

Avery lived in a Haverford apartment building his family owned. He told the judge he had a doctorate in spirituality. Late last year, he sold the apartment building to a developer for more than $1 million, records show.

Sarmina ordered Avery to surrender on April 2. He also has to register as a lifetime sexual offender.

Barbara Blaine, president of the Survivors Network of Those Abused by Priests, said, "We hope all of Avery's victims will feel comforted knowing that kids will be safe from him for several years."