Spencer Platt/Getty Images(NEW YORK) — Harvey Weinstein asked a New York City judge on Friday to throw out the two indictments returned against him in the last few months, arguing the Manhattan District Attorney’s Office failed to meet its technical burden in filing a series of sex crimes charges against the disgraced film producer.

A new court document cites 40 emails that Weinstein’s defense said prove the woman he allegedly raped was no victim but a consensual sexual partner. The defense accused prosecutors of failing to present those emails to the grand jury.

“Among the numerous grounds supporting dismissal, the motions reveal the existence of exculpatory evidence known to the prosecution but intentionally kept from the grand jurors, communications which corroborate Mr. Weinstein’s factual innocence in this case,” defense attorney Ben Brafman said in a statement provided to ABC News. “These communications irrefutably reflect the true nature of this consensual intimate friendship, which never at any time included a forcible rape.”

The Manhattan District Attorney’s Office declined to comment.

Weinstein is charged with six counts including predatory sexual assault, criminal sex act and rape that stem from alleged encounters with three different women. He has pleaded not guilty and denied non-consensual sex with any person.

The unnamed woman who accused Weinstein of raping her on March 18, 2013, in a Manhattan hotel “sent extensive warm, complimentary and solicitous messages to Mr. Weinstein immediately following the now claimed event and over the next four-year period,” Brafman said.

Weinstein obtained the emails from The Weinstein Company, the studio he co-founded, as part of a federal bankruptcy court proceeding. The judge granted him access to the emails for use in his criminal defense as long as he omitted names and initials.

The defense quoted from messages Weinstein said he received from the woman who accused him of rape in the weeks and months after the alleged attack.

“[I] hope to see you sooner than[] later…” according to a message from April 11, 2013. “I appreciate all you do for me, it shows” said another message the following day.

Little more than a month after the alleged rape Weinstein said he received an email from the accuser that said “It would be great to see you again, and catch up! It would mean a lot if we could catch up over a drink then.”

The emails “would appear to contradict that [the woman] ever believed she had been forcibly raped,” the defense motion said.

Copyright © 2018, ABC Radio. All rights reserved.