Harvey Weinstein's lawyers are hoping to rebound after weeks of testimony against the now-disgraced movie mogul by bringing a film director to cast doubt on the credibility of one of his rape accusers.

The defense brought in Warren Leight, who wrote and directed the 1993 film "The Night We Never Met," starring Annabella Sciorra, the actress who testified early in the trial that Weinstein barged into her apartment and raped her in the mid-1990s.

However, Leight has another connection to the case, since he wrote a "Law & Order: Special Victims Unit" episode directly inspired by Weinstein.

Now the showrunner and executive producer on “Law & Order: Special Victims Unit," Leight penned the famous #MeToo-themed episode of the show, based on the 67-year-old's legal saga.

NAKED PHOTOS OF HARVEY WEINSTEIN SHOWN TO NEW YORK JURORS

In the episode titled "I'm Going to Make You a Star," the head of a big media studio is arrested after he's accused of raping young actresses and forcing one to watch him masturbate at an audition. In a line evoking what accusers have said of Weinstein, the mogul character tells a victim: “You want this part, don’t you?”

Actress Annabella Sciorra testified in court about her alleged rape at the hands of Harvey Weinstein.

Actress Annabella Sciorra testified in court about her alleged rape at the hands of Harvey Weinstein. (AP Photo/Richard Drew)

"I thought, go big," Leight told People magazine after the episode aired in September.

HARVEY WEINSTEIN ACCUSER DETAILS HER ALLEGED ASSAULT IN COURT: 'I'M BEING RAPED'

Sciorra, the first of six accusers to take the witness stand, was friends with Leight and testified that she brought his “The Night We Never Met” script to Weinstein's attention, even staging a reading with her theater company so the once-revered Hollywood honcho could hear it acted out.

Sciorra, now 59, said Weinstein agreed to make the film, but only if she starred in it — something she resisted because she already had back-to-back movie shoots booked and didn't want a third.

To help her cope with the grueling schedule, Sciorra said Weinstein sent her a care package that included a bottle of Valium and that, by the time “The Night We Never Met" started filming, she was hooked on the drug. She said it was around the same time that she started drinking alcohol.

On cross-examination, defense lawyer Donna Rotunno questioned if Sciorra was on Valium or drunk the night she alleges Weinstein raped her. The actress denied both, saying she had weaned herself off the drug by then and didn't have much to drink that night.

“I realized I was addicted to the Valium and I was taking it during the day a lot, at nighttime,” Sciorra testified. “I also knew it wasn't good for me.”

Harvey Weinstein leaves a Manhattan courthouse after a second day of jury selection for his trial on rape and sexual assault charges, Thursday, Jan. 16, 2020, in New York.

Harvey Weinstein leaves a Manhattan courthouse after a second day of jury selection for his trial on rape and sexual assault charges, Thursday, Jan. 16, 2020, in New York. (AP Photo/Bebeto Matthews)

“The Night We Never Met” finished filming in December 1992, according to the Internet Movie Database. Sciorra alleges Weinstein raped her in late 1993 or early 1994 after giving her a ride home from a dinner with people in the film industry.

HARVEY WEINSTEIN'S PROSECUTORS REST THEIR CASE IN HIS ONGOING RAPE TRIAL

Rotunno foreshadowed Leight's appearance on the witness stand as she grilled Sciorra about her use of Valium and her behavior on the set of “The Night We Never Met.” At one point, the lawyer asked if Leight ever spoke to her “about the fact you were intoxicated.”

Sciorra said no, but later said, “He might have, I don't recall."

Leight, 63, went on to write the play “Side Man,” a 1999 Pulitzer Prize finalist, and was a top producer on the HBO series “In Treatment.” He started in television as a writer on “100 Centre Street,” a short-lived 2002 drama series about the very New York City courthouse where Weinstein is on trial.

Prosecutors rested their case against Weinstein on Thursday after more than two weeks of testimony from about two dozen witnesses.

Weinstein is charged with raping a woman in a Manhattan hotel room in March 2013 and forcibly performing oral sex on a different woman in 2006. Sciorra's allegations, too old for criminal charges on their own, are the basis for a charge alleging Weinstein is a serial predator who has committed multiple assaults over the years.

Harvey Weinstein arrives at court for his trial on charges of rape and sexual assault, Monday, Feb. 3, 2020 in New York.

Harvey Weinstein arrives at court for his trial on charges of rape and sexual assault, Monday, Feb. 3, 2020 in New York. (AP Photo/Mark Lennihan)

Weinstein has maintained any sexual encounters were consensual.

Weinstein's lawyers on Friday are also expected to call to the witness stand cognitive psychologist Elizabeth Loftus, who specializes in human memory. They are looking to raise doubts about the accusers' recollections of encounters that, in some cases, are more than a decade or two old.

The first defense witness, an industry executive who remains a Weinstein ally, seemed blindsided on Thursday when a prosecutor confronted him with text messages that appeared to justify Weinstein's behavior and bash his accusers.

Paul Feldsher, a former agent who once knew Sciorra, scolded Weinstein in November 2018 for “behaving like a cad.” But in another message shown to the jury, he stuck up for Weinstein, telling him: “I think the dog pile of actresses who are suddenly brave and recalling repressed memories is hideous.”

CLICK HERE TO GET THE FOX NEWS APP

The defense had hoped Feldsher would discredit Sciorra by recounting a conversation he had with her in the early 1990s in which she supposedly told him she had “done this crazy thing with Harvey” but didn't say she had been assaulted.

“My understanding was that she fooled around with him," Feldsher testified.

Fox News' Marta Dhanis and The Associated Press contributed to this report.