Bill Cosby
Bill Cosby departs the Montgomery County Courthouse after a preliminary hearing in Norristown, Pennsylvania Mark Makela/ Reuters

Damaging confessions made by Bill Cosby, including that he gave young girls drugs and alcohol before sex, can be used at his criminal sex assault trial, a judge has ruled.

Lawyers for the shamed actor, best known for his role in The Cosby Show, tried to have the testimony he gave in a civil suit from 2006 suppressed. However, their motion has been denied.

They argued that Cosby only made his confessions on the promise he would not be prosecuted, after settling for an undisclosed amount of money.

However, in the Philadelphia hearing on Monday (5 December), Montgomery Country Judge Steven O'Neill said that promise was not in writing.

"This court concludes that there was neither an agreement nor a promise not to prosecute, only an exercise of prosecutorial discretion," he said in his ruling, AP reported.

Cosby, 79, acknowledged in the 2006 deposition that he had a string of extramarital relationships with young women. He called them consensual, but many of the women say they were drugged and molested.

The release of the deposition testimony last year prompted prosecutors to reopen previous criminal complaints.

That included Cosby's encounter in 2004 with Andrea Constand, who was the subject of the 2006 deposition and one of the complainants in the current criminal case.

Cosby gave Constand three unmarked blue pills after she complained of stress, rendering her semiconscious, before allegedly assaulting her.

When asked about the incident, Cosby said: "I don't hear her say anything. And I don't feel her say anything. And so I go into the area that is somewhere between permission and rejection. I am not stopped."

In another part of the testimony, Cosby described a phone call with Constand's mother a year after the incident, in which he refused to describe what the pills were.

He said: "I'm not going to argue with somebody's mother who is accusing me of something. And I'm apologising because I'm thinking this is a dirty old man with a young girl. I apologised. I said to the mother, it was digital penetration."

In another part of the deposition, Cosby described getting prescriptions for Quaaludes, which he kept on hand to give women he hoped to seduce. He said it was "the same as a person would say, 'Have a drink.'"

The decision to include the testimony is one of two key pre-trial issues being considered. The other is how many other accusers will be allowed to testify, so that prosecutors can attempt to establish a pattern of similar conduct.

Prosecutors hope that all 13 additional women, whose allegations span back to the 1960s, will be allowed to give their evidence.

That will be decided in two days of hearings next week, but Cosby's lawyers are expected to fight strenuously to block the testimony, arguing that the women's accounts are vague, decades old and impossible to defend.

They also claim that Cosby is legally blind and can no longer recognise his accusers or help with the defence.