NORRISTOWN, Pa. (AP) — Prosecutors wrapped up their case against Bill Cosby on Friday, saving until practically the very end the comedian’s damaging, decade-old testimony about giving quaaludes to women he wanted to have sex with.

The prosecution called 12 witnesses over five brisk days of testimony in the sexual assault case that could send the 79-year-old TV star to prison for the rest of his life. The defense will begin presenting its side on Monday.

Testifying under oath in 2005, Cosby said he obtained several prescriptions for quaaludes in the 1970s and offered the now-banned sedatives to others, “the same as a person would say, ‘Have a drink,’” according to the deposition read to the jury.

“When you got the quaaludes, was it in your mind that you were going to use these quaaludes for young women that you wanted to have sex with?” the comic once known as America’s Dad was asked.

“Yes,” he said.

Cosby is on trial on charges he drugged and sexually violated former Temple University women’s basketball team employee Andrea Costand, now 44, at his suburban Philadelphia home in 2004. He has said it was consensual.

Jurors at Bill Cosby's sexual assault trial have heard excerpts from the comedian's lurid, decade-old deposition, but explosive sections about him obtaining quaaludes and giving them to women before sex are expected Friday. (June 9)

In the deposition, which became public nearly two years ago, Cosby said he gave Constand three half-tablets of the cold and allergy medicine Benadryl. Prosecutors have suggested he gave her something stronger — perhaps quaaludes, a highly popular party drug in the 1970s that was banned in the U.S. in 1982.

Prosecutors evidently saved the quaalude testimony until the end for maximum effect. Defense lawyer Brian McMonagle, clearly wanting to move past Cosby’s talk about giving drugs to women, asked no questions about it on cross-examination.

The final prosecution witness, toxicologist Dr. Timothy Rohrig, testified that wooziness and other effects Constand described could have been caused by Benadryl or quaaludes.

Cosby smiled as he walked out of court at the end of the day, raising his wooden cane to salute well-wishers who yelled, “We love you, Bill Cosby!” and “Hey, hey, hey!,” the catchphrase from his “Fat Albert” TV show. He then waved from the back of an SUV.

The comedian gave the deposition as part of a lawsuit filed by Constand and later settled for an undisclosed sum. His testimony was sealed for years until portions were released by a judge in 2015 at the request of The Associated Press.

The release of the sensational testimony spurred Pennsylvania prosecutors to reopen their investigation and arrest Cosby a decade after the district attorney who originally investigated Constand’s complaint decided the case was too weak to bring charges.

For the jury, the deposition could be the closest it comes to hearing from Cosby himself, since he said recently that he did not intend to take the stand.

In his testimony, Cosby said he apologized to Constand’s mother over the telephone for the sexual encounter with her daughter because he was afraid she thought of him as “a dirty old man.”

“I apologized to this woman. But my apology was, my God, I’m in trouble with these people because this is an old man and their young daughter and the mother sees this,” he said.

Cosby also recounted offering to pay for graduate school for Constand. She turned him down.

Hoping to blunt one of Cosby’s main lines of defense, prosecutors put on the stand a psychologist who testified that victims of celebrities are often afraid to come forward because of the possible backlash. Constand did not go to police until a year after the alleged assault.

“If it’s a well-known person, the victim takes on a lot of responsibility for that person’s reputation, especially if that person is well-liked or beloved,” Veronique Valliere testified.

Cosby’s lawyers asked for a mistrial, complaining that Valliere was offering observations about Cosby even though she was only allowed to testify generally about victim behavior. The judge rejected the request.

In a barrage that all but destroyed Cosby’s good-guy reputation, some 60 women have come forward to say he sexually violated them, but the statute of limitations for prosecution had run out in nearly every case. Constand is the only woman whose allegations have resulted in criminal charges against the “Cosby Show” star.

During a break Friday, Cosby’s spokesman dangled the possibility the comic might testify after all. Cosby and his lawyer wouldn’t comment on that, and the defense has not disclosed its strategy or the witnesses it intends to call during its portion of the case.

Testifying would carry enormous risk for Cosby, exposing him to cross-examination about some of the lurid things in his deposition.

Cosby’s wife, Camille, has yet to be seen in court. Cosby spokesman Andrew Wyatt said the TV star told her stay away so that she wouldn’t have to endure the “media circus.”

The AP does not typically identify people who say they are victims of sexual assault unless they grant permission, which Constand has done.