Bill Cosby on Monday lost one of the biggest legal battles leading up to his looming sex-assault trial when a Montgomery County judge ruled that prosecutors can tell jurors about damaging, decade-old testimony in which Cosby acknowledged offering drugs to women he wanted to seduce.

The decision means the once-sealed 2005 deposition that led District Attorney Kevin R. Steele's office last year to reopen the investigation and charge the entertainer can become a pillar of the evidence offered to try to convict him.

Cosby's lawyers argued that he agreed to the deposition - taken to resolve a lawsuit by his accuser, Andrea Constand - only because he had been promised by a previous district attorney that he would never be charged in connection with her claims.

But Judge Steven T. O'Neill concluded that no such agreement existed.

"There was neither an agreement nor a promise not to prosecute," he wrote, "only an exercise of prosecutorial discretion."

O'Neill's six-page ruling marked a significant victory for prosecutors and the latest setback for the 79-year-old comedian-actor as he inches toward a trial the judge has said he wants to begin by June.

Cosby's lawyers declined to comment on the latest ruling. Steele praised it.

"Allowing the jury to hear Mr. Cosby's deposition testimony is another step forward in this case and will aid the jury in making its determination," he said in a statement. "It's important that we are able to present all of the evidence available."

Since he was charged last year with three felony counts of aggravated indecent assault, Cosby has lost on every issue he has raised with the court, including a bid to have the case thrown out based on the same purported 2005 oral agreement with then-District Attorney Bruce L. Castor Jr.

Testifying at a hearing in Norristown this year, Castor contended that he promised not to prosecute after concluding that Constand's allegations that Cosby drugged and assaulted her in 2004 at his Cheltenham home were too weak to take to trial.

In doing so, Castor said, he hoped to force Cosby to testify in the civil suit she had filed by removing any reason for him to assert his Fifth Amendment right against self-incrimination.

But O'Neill, in his opinion, put Castor's credibility under a microscope and found it lacking, noting that the former district attorney contradicted himself several times in statements to colleagues and reporters about the alleged agreement.

"There are numerous inconsistencies in the testimony and writings of Mr. Castor," the judge wrote.

O'Neill also suggested that Cosby might have had other motives to answer questions from Constand's lawyers, including the fact that jurors deliberating in civil cases are allowed to consider whether a defendant agrees to testify or invoke the Fifth Amendment.

But Constand's civil suit never reached that point. Both parties settled out of court for an undisclosed sum a decade ago. As part of that settlement, transcripts of their testimony remained private under a confidentiality agreement - until a federal judge in Philadelphia unsealed portions of Cosby's deposition last year.

Steele has cited the availability of that transcript - and Cosby's own description of his sexual past - as a reason his office decided to reopen the criminal investigation that Castor abandoned.

In the deposition, Cosby testified that he had consensual sexual encounters with Constand and other women. He also said he obtained seven prescriptions for quaaludes in the 1970s to use in encounters with women he hoped to seduce.

But he denied ever sexually assaulting anyone.

He also described a phone call with Constand's mother a year after the alleged assault, in which he apologized but refused to say what pills he had given her daughter.

"I'm not going to argue with somebody's mother who is accusing me of something," he testified, according to the transcripts. "And I'm apologizing because I'm thinking this is a dirty old man with a young girl. I apologized."

At the time of the alleged assault, Cosby was 67. Constand, then the operations director for Temple University's women's basketball team, was 31.

Many of the other women Cosby discussed in the deposition have since said he drugged and abused them.

Several are at the core of the next big evidentiary fight in Cosby's case - one set to play out in hearings next week in Norristown.

Steele hopes to call as trial witnesses 13 other women - among more than 50 nationwide who have made similar claims against Cosby - to bolster Constand's allegations.

Cosby's lawyers are preparing a vigorous fight to keep those women off the stand, with plans to argue that their accounts are too old and too vague to be defensible.

They have also said that Cosby is now too blind to recognize whether he had even met some of the women before. 215-854-2608 JeremyRRoebuck