Cardinal Anthony J. Bevilacqua can be examined by a prosecution expert to see if he's competent to answer questions about claims that local priests sexually abused children when he led the Archdiocese of Philadelphia, a judge ruled today.

Acting on a request by assistant district attorneys, Common Pleas Court Judge M. Teresa Sarmina said she is proceeding under the assumption that the retired cardinal is competent to testify in the trial of a former aide, but will await more information before deciding if, when or where he will take the stand.

Sarmina canceled plans for three days of testimony by Bevilacqua later this month, but set Nov. 28 as a tentative hearing date.

The judge also left intact a gag order barring lawyers and defendants from publicly commenting on the case.

The battle over the 88-year-old cardinal's testimony has emerged as a subplot in the looming trial of three priests, a defrocked priest and a former Catholic schoolteacher. Four of the men are accused in the alleged rapes of two boys in the 1990s.

Prosecutors say the fifth defendant, Msgr. William J. Lynn, the archdiocese's former secretary for clergy, endangered children by allegedly failing to remove sexually abusive priests or recommending them for posts that gave them access to minors.

They want to depose Bevilacqua, who was Lynn's boss between 1992 and 2003, to bolster their claim that the practice was part of a broader pattern or directive among church leaders.

They also have asked the judge to allow them to capture Bevilacqua's answers in a videotaped deposition before the scheduled March trial because of claims that his health is failing.

The cardinal's lawyer, Brian J. McMonagle, says he suffers from dementia and cancer and is unfit to testify. He submitted two years of medical records and contends the prosecutors' are trying to force the reclusive cardinal to "walk the gauntlet" under a media spotlight at the courthouse.

Bevilacqua retired in 2003 after 15 years as the leader of the 1.5 million-member archdiocese. He still lives at his residence at St. Charles Borromeo Seminary off City Avenue but has largely avoided public appearances.

Lynn's job included recommending to the cardinal where diocesan priests should be assigned. He is the first church official nationwide to be criminally charged with enabling or covering up clergy sex abuse.

Like the other defendants, he has denied any wrongdoing and pleaded not guilty.

Assistant District Attorney Jacqueline Coelho said today prosecutors hope to outline for jurors how Lynn responded to dozens of child sex abuse accusations against priests. Those cases were detailed in a 2006 grand jury report.

Lynn's lawyers, Thomas Bergstrom and Jeffrey Lindy, told the judge they will fight to keep those old cases out.

Also today, the judge rejected a request by Bergstrom and Lindy to lift her order barring them from publicly discussing the case.

Sarmina's ruling came as she threatened to sanction Lindy for remarks to The Inquirer this week. In a story published Wednesday, Lindy said he was gratified to hear that Lynn had received a standing ovation and words of support during a private dinner last month with diocesan priests and their newly installed leader, Archbishop Charles J. Chaput.

In the story, Lindy called Lynn a "good person."

Sarmina challenged Lindy's contention that his comments on the dinner were unrelated to the criminal case and not subject to her gag order. She said many readers would interpret the scene as the archbishop and priests repudiating prosecutors' charges against Lynn.

Lindy disagreed. The ovation, he said, "had to do with the priests saying to the archbishop: Thank you for not casting him off."

Sarmina held off on the sanctions, but warned all the parties to keep silent. "If your name is in quotes, figure you're going to be getting an order from me," she said.

Chaput and the archdiocese declined to elaborate on his remarks at the dinner earlier this week. But after hearing the matter had been discussed in court, an archdiocesan spokeswoman offered its first comment on the event.

"Bishops have an obligation to show pastoral concern for their people, their priests and the wider community," spokeswoman Donna Farrell said Friday. "That includes victims of sexual abuse. It also includes those accused of wrongdoing, including clergy. The archdiocese fully supports the integrity of the legal process and the need of victims for healing."

Contact staff writer John P. Martin at 215-854-4774 or at jmartin@phillynews.com. Follow him at JPMartinInky@twitter.com

Follow the Inquirer at www.Twitter.com/PhillyInquirer and www.Facebook.com/PhillyInquirer