Marguerite Jackson, a key defense witness, walks into the courtroom after a break in the Bill Cosby sexual assault retrial. (Corey Perrine/Pool via Reuters.)

NORRISTOWN, Pa. — Bill Cosby’s defense team delivered its long-awaited bombshell witness Wednesday, calling to the stand a woman who says the comedian’s primary accuser confided plans to “set up a celebrity” with a false sex-assault story.

The appearance of Marguerite Jackson, a Temple University academic adviser, may be the defense’s best opportunity to undercut the credibility of Andrea Constand, the former Temple women’s basketball official who has accused Cosby of drugging and sexually assaulting her in 2004. Speaking in a matter-of-fact tone, Jackson was unwavering in her claim that Constand said she could fabricate a tale to earn enough money to quit her job and go back to school.

 Jackson’s emergence as a key defense witness has been entwined in intrigue for more than a year. At Cosby’s first trial, which ended with a hung jury last June, she was blocked from testifying. But Cosby’s public relations team still managed to get her story out. During the trial, Cosby’s spokesman Andrew Wyatt read a statement from Jackson on the courthouse steps, an unusual move that drew the ire of Judge Steven T. O’Neill, who has overseen both Cosby’s original trial and the ongoing retrial.

O’Neill did not disclose his reasons for blocking Jackson’s testimony in the first trial, then reversed himself in advance of the retrial, saying the landscape of the case had changed and granting permission for the academic adviser to take the witness stand.

 Jackson’s involvement in the case tracks back to a comedy show she attended while on a cruise in November 2016, she told jurors. After the show, she ran into the comedian — who she did not name — in the ship’s bar. The comedian offered to buy her a drink, she said, then cracked that “he wouldn’t put anything in it.”

 Jackson told jurors that she thought the comment was odd, but she still agreed to have drink with the comedian — but only as long as he also bought drinks for her sister and cousin, who had accompanied her on the cruise. They got to talking about Cosby, Jackson said, and she told the comedian about her conversation with Constand. The comedian, she said, put her in touch with Cosby’s defense team.

Jackson says she got to know Constand when both of them were working with the Temple University women’s basketball team. She told jurors that she roomed with Constand on a team trip to Rhode Island in February 2004. Constand, she said, talked to her about framing a celebrity after they watched a television news broadcast about a celebrity who was being sued in a sexual assault scandal.

 Jackson testified that she told Constand that “money is a great motivator” in such cases.

 Jackson, a 31-year employee at Temple who is also an unlicensed therapist at a drug rehabilitation facility, said she pressed Constand for more information. She testified that the third time she asked Constand whether the assault had actually occurred, Constand responded: “No, it didn’t. But I could say it did.”

 Jackson’s claim has already been directly refuted by Constand, who testified earlier in the trial that she not only had never roomed with Jackson, but also that she always had her own room on team trips. The defense has yet to present documentary evidence, such as hotel room assignment rosters, to back Jackson’s claim about rooming with Constand, and it’s unclear whether they have such material.

During pointed cross examination, prosecutors managed to peck some small holes in her testimony. For instance, she said in two statements to the defense that she had roomed with Constand six times, but while testifying Wednesday she said they’d roomed together “two or three times.”

 Assistant District Attorney Stewart Ryan also tried mightily to suggest that Jackson’s testimony had been massaged by the defense. Her first statement had no quotes in it, but a second statement, prepared for the retrial, is filled with direct quotes. In her first statement, Jackson said Constand confided that she didn’t report the alleged assault because of her attacker’s prominence. But in the statement prepared for the retrial, she added that Constand said she “couldn’t prove” the allegation.

 Ryan also seemed to suggest that Jackson might be testifying to generate publicity for a side music-promotion business she operates. He pointed out that she hosted a launch party for a music company about two months after her statement was read at Cosby’s first trial by Cosby’s public relations team.

Ryan also injected a new element into the case by pressing Jackson about Patrick O’Connor, a prominent Philadelphia attorney who served on the Temple board of trustees with Cosby and represented the entertainer in Constand’s 2005 lawsuit against Cosby. But Jackson said she’d never spoken to O’Connor about Cosby. Prosecutors have also suggested that Temple officials instructed a person affiliated with the university from cooperating with investigators looking into Constand’s allegations.

Cosby, now 80, watched the proceedings with a perceptible air of amusement. Often during Jackson’s testimony, he rocked in his chair at the defense table. His face bore a satisfied smile.