Prosecutors in the endangerment and child sex-abuse trial of three current and former priests scored a major legal victory on Monday, when a judge ruled that they could tell jurors how the Archdiocese of Philadelphia handled years of abuse allegations against nearly two dozen other priests.

Common Pleas Court Judge M. Teresa Sarmina said jurors could hear the evidence because it could show that Msgr. William J. Lynn, a former high-ranking archdiocesan official, recommended parish posts for two priests in the 1990s despite knowing or suspecting they might molest boys.

Lynn made those recommendations, the judge said, after reviewing the church's secret personnel files and learning about claims or suspicions against other priests.

"It will be up to the jury to decide that there were no lessons to be gleaned from those earlier cases," she said.

A spokeswoman for District Attorney Seth Williams said the office had no comment, citing the judge's gag order.

Both prosecutors and defense lawyers portrayed the issue as a cornerstone of the case against Lynn and his codefendants, the Rev. James J. Brennan and Edward Avery, a former priest, as they head to trial in March.

Over three days of arguments last month, four assistant district attorneys contended that it was proper and even necessary under court rules for jurors to hear how Lynn responded to allegations involving sexually abusive priests when he was secretary for clergy between 1992 and 2004.

They asked to introduce accusations against nearly 30 other priests, including some accused of molesting children more than 40 years ago.

"Without the context of the archdiocese's decades-long policy of protecting sexual offenders and Lynn's active participation in implementing this policy for over 10 years, his recommendations and actions on behalf of Avery and Brennan could mistakenly be viewed as something less than criminal," Assistant District Attorney Mariana Sorensen wrote in a 53-page filing.

Lynn's lawyers fought the request, contending that introducing old and never-charged allegations was irrelevant, was time-consuming, and would unfairly inflame the jury. They argued that nearly all the complaints involved conduct that occurred before Lynn became secretary for clergy or that was exposed or verified after he left the post.

They also complained that Williams' office was trying to revive a criminal case that his predecessor, Lynne M. Abraham, chose not to pursue.

Nearly all the allegations were disclosed in an investigation Abraham launched a decade ago. That probe ended with a scathing grand jury report faulting Lynn, Cardinal Anthony J. Bevilacqua, and other church leaders but recommending no charges.

In her ruling, Sarmina said prosecutors could introduce evidence about 22 other current or former priests, including Stanley Gana and Nicholas Cudemo, described as serial pedophiles who were shuffled among schools and parishes for years.

The judge said the common thread in the cases was not that they involved priests with "problematic" histories.

"No, it is that all of them have children who were hurt by priests in positions of power," Sarmina said. "And that these victims of the priests' behavior were brought to the attention of the leadership of the archdiocese - or so the allegations run."

Without explaining her reasoning, the judge tentatively barred prosecutors from introducing evidence about a half-dozen other clergy members, including the Rev. John Mulholland, who allegedly wrote a letter in 1968 about a sadomasochistic outing with three teenage brothers.

Lynn's lawyers had argued that there was no proof that Mulholland ever participated or witnessed any such activity, and that the letters, while disturbing, were written a quarter-century before Lynn took the job of monitoring archdiocesan priests.

Lynn, 61, is the first church official nationwide to face trial in an alleged cover-up of clergy sex-abuse. Prosecutors say he endangered children by allowing Brennan and Avery to have positions that gave them access to children.

Brennan, 48, is accused of raping a 14-year-old boy in 1996, and has been placed on restricted ministry. Avery faces charges of abusing a 10-year-old boy in the late 1990s, and prosecutors say they have fielded new abuse complaints about him since his arrest. Avery, 69, was defrocked in 2006.

All three have pleaded not guilty.

Sarmina noted that as secretary of clergy, Lynn was the cardinal's top aide charged with reviewing allegations of sex abuse by priests.

"Lynn's very testimony before the grand jury, that he familiarized himself with all the files in the secret archives, opens the door to the content of those files to show what he knew as of the time the Brennan and Avery cases presented themselves for him to address," she said.

Jury selection is expected to begin on Feb. 22, with opening arguments about a month later. Sarmina signaled a willingness to consider a slight delay to accommodate an avalanche of additional evidence.

One of Lynn's lawyers, Jeffrey Lindy, noted on Monday that the archdiocese had only recently turned over 22,000 pages of documents that could be relevant at trial.

"I don't know how the heck any of us is going to be ready for trial," Lindy said.

Two other men arrested in the probe - the Rev. Charles Engelhardt and a former Catholic schoolteacher, Bernard Shero - won bids to be prosecuted in separate trials.

Contact staff writer John P. Martin at 215-854-4774, jmartin@phillynews.com, or @JPMartinInky on Twitter.