Benjamin Brafman, the New York attorney representing Harvey Weinstein, called for all charges against his client to be dismissed in a new court filing Thursday, alleging that one of the women accusing him of sexual assault had tried to “fabricate” witness testimony. Brafman also argued that a series of supposedly “friendly” email exchanges between Weinstein and two accusers undermined the case against him.

According to the motion, the defense recently interviewed a “close friend” of one of Weinstein’s two accusers in the criminal case. The friend was acquainted with the accuser, who has not been identified in court documents, before and after her alleged rape by the film mogul in March of 2013. In her statement to the defense, the witness reported that she had known the accuser and Weinstein had been “hooking up” for a “very long time.” She had seen them “hanging out socially” on at least five separate dates, before and after the alleged rape. The witness told Brafman she had never heard the accuser “say anything bad” about Weinstein until this year.

Brafman wrote that the witness had not spoken to her friend since 2015, due to an unspecified disagreement, but that last year, the accuser had called her. On the call, according to the motion, the accuser told her friend that Weinstein had assaulted her in 2013. She then asked her friend to “assist... with the accusation she was making against Mr. Weinstein.” According to Brafman, the witness told the accuser that she had never known about the assault and did not want to be involved.

Brafman wrote that the witness “declined to make up a story.” He did not state whether the accuser had asked her to do so.

From this interview, Brafman concluded that the accuser “may have attempted to fabricate a ‘prompt outcry’ witness, years after the alleged assault.” A prompt outcry witness is someone who heard about an allegation of abuse shortly after the incident took place, and can be called upon to testify in court.

According to the document, a New York Police Department detective contacted the witness months after the call, and heard the entire story, but did not disclose it to the defense. The Manhattan District Attorney’s Office, which has had a fraught relationship with the NYPD during the investigation and the prosecution of Weinstein, declined to comment on the motion.

In the 82-page filing, Brafman also cited two threads of text and email exchanges between Weinstein and two accusers: actress Mimi Haleyi and an unnamed woman. He claimed the emails, which he described as “friendly” exchanges, proved goodwill between Weinstein and the two women.

In February of 2007, Haleyi sent Weinstein’s assistant “Hi! Just wondering if u have any news on whether harvey will have time to see me before he leaves? x Miriam.” (The actress also goes by the first name “Miriam”). Four months later, when Weinstein invited her to a movie premiere, Haleyi wrote that she could not attend but to “please let Harvey know the gesture was most appreciated.” In other exchanges, the actress signed off “lots of love.”

Brafman also cited email exchanges from a woman who claimed the mogul assaulted her August 12, 2010 in Manhattan. The next day, when Weinstein wrote to her that “the really good news is how much I think about you,” the woman wrote back: “I have been thinking about you too.” A few months later, the woman agreed to go to the opera with Weinstein, writing that she “would love to” see it. In a third exchange, Weinstein tells her he is on a boat, and jokes about getting lost at sea, to which she responds “NO please do not get lost at sea….” (His response: “Thank god the crew is male.”).

The unnamed woman is not involved in Weinstein’s ongoing criminal case, but has filed a separate suit in civil court. Weinstein included her emails in the motion because prosecutors can occasionally file a motion to call on accusers other than the plaintiffs to establish a pattern of predatory behavior.

These kinds of witnesses, called “Molineux witnesses,” have not yet been permitted by James Burke, a judge overseeing the trial. Burke previously rejected a request from Brafman to see a list of potential Molineux witnesses, on the grounds that the request came too early to grant.

The decision to quote from these emails and use the names of the women involved was controversial, coming after a court conference call on Monday where attorneys representing some of the accusers protested Brafman’s request, claiming that their clients were not yet involved in the criminal proceedings and had not had the opportunity to review the messages, according to Variety. But Judge Mary Walrath, who is overseeing a separate court case involving Weinstein & Co.’s bankruptcy, ruled that Brafman and lawyers affiliated to the bankruptcy suit could quote from the exchanges.

The filing comes in the midst of a heated pre-trial battle between Brafman and the Manhattan District Attorney’s Office, over what the former claims was a botched investigation and Grand Jury indictment.

In October, Brafman succeeded in having a judge dismiss one of six criminal charges against his client. The charge concerned Irish actress Lucia Evans’ allegation that Weinstein had pressured her into performing oral sex on him in the summer of 2004. That was dropped from the case after Manhattan prosecutors acknowledged the lead detective on the case, New York police officer Nicholas DiGaudio, neglected to present witness testimony which undermined Evans’ story to the Grand Jury, before they indicted Weinstein in May.

Then on November 5, Brafman filed a motion to dismiss all five remaining charges, after prosecutors disclosed that DiGaudio had told one of the remaining plaintiffs that she could delete data from her phone before handing it over to prosecutors. (The plaintiff told the District Attorney’s office that she did not tamper with anything, but reported the comment to her attorney).

“The entire superseding indictment,” Brafman wrote in his motion to dismiss, “was based on a defective Grand Jury proceeding that was irreparably tainted by police misconduct, Lucia Evans’ false testimony and the District Attorney’s failure to provide the Grand Jury with exculpatory evidence of the long-term, consensual, intimate relationship between Mr. Weinstein and the alleged rape victim charged in Counts Three, Four, and Five of the indictment.”

But later in November, the District Attorney’s office fired back with a rebuttal of Brafman’s arguments, claiming DiGaudio’s misconduct concerned only the dismissed count and deriding the defense attorney’s claim that one count alone – and the least serious one at that – could undermine an entire indictment proceeding.

The next court hearing is set for December 20, where a Manhattan judge may determine whether Brafman’s latest blow to the case against Weinstein will be the last.