Bill Cosby gives a thumbs-up gesture, departing from court after prosecutors rested their case in his sexual assault trial in Norristown, Pa., Friday. (Matt Rourke/AP)

Bill Cosby thought he could talk his way out of his problems with the woman who accused him of drugging and sexually assaulting her.

Jurors in the comedian’s sexual assault trial have heard a recording of one of Cosby’s phone conversations in 2005 with Gianna Constand, the mother of his alleged victim, Andrea Constand. But it wasn’t until Friday — on the trial’s fifth day — that jurors learned what was going through the comic legend’s mind during those conversations.

“I’m thinking this is a dirty old man with a young girl,” Cosby said, according to a decade-old deposition read to jurors Friday by a police officer. “The mother is coming at me for being a dirty old man.”

The deposition, which Cosby submitted to as part of a civil lawsuit filed against him by Andrea Constand, served as one of the final pieces of evidence presented by prosecutors, who rested their case after a week of often dramatic testimony. On Monday, the defense is slated to begin what is expected to be a very short presentation. Presiding Judge Steven T. O’Neill predicted that jurors will start deliberating early next week.

Prosecutors closed their case by calling a toxicology expert to testify that Benadryl, an over-the-counter allergy medication Cosby says he gave to Constand on the night of the alleged assault, could put a person to sleep. Cosby has said he gave Constand 1½ Benadryl tablets. An adult would need to take only one tablet to induce drowsiness, expert Timothy Rohrig said.

Rohrig also testified that Constand’s symptoms were similar to the physical effects associated with quaaludes, a powerful sedative. Jurors heard late Friday afternoon about Cosby’s admission in his civil lawsuit deposition that he got at least seven quaalude prescriptions to give to women with whom he wanted to have consensual sex.

The deposition is a key piece of evidence for prosecutors seeking to convict the 79-year-old comedian of three counts of aggravated indecent assault. Cosby was deposed over four days in late 2005 and early 2006.

Constand, then an administrator with Temple University’s women’s basketball team, was 30 at the time of the alleged crime in 2004. Cosby, then in his 60s, sat on the Philadelphia school’s board of trustees.

The lengthy transcript describes how Cosby tried to negotiate with Constand’s anguished mother when she had just learned of the alleged incident at Cosby’s suburban Philadelphia estate.

Cosby pressed Gianna Constand to agree to an in-person meeting to discuss their problems and the possibility of the wealthy entertainer paying for Andrea Constand to attend graduate school.

The meeting never took place. Earlier in the trial, Constand’s mother testified that she wasn’t looking for money from Cosby. But there was something she wanted from him — something he was willing to give.

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