NEW YORK (AP) — Harvey Weinstein's lawyers want to use intimate emails from his accusers to try to convince jurors in his rape trial that any contact was consensual, the defense said Tuesday as an appeals court rejected an 11th-hour request to move the trial out of town.

Opening statements are set for Wednesday in one of the most prominent cases of the #MeToo era, involving the once-celebrated movie producer and a witness list that includes well-known actresses, among other women who say he sexually assaulted them.

In a three-paragraph ruling Tuesday, a panel of state appeals judges declined to move the trial or delay it for further deliberation. The same court turned down a similar request three months ago from Weinstein's lawyers, who say it's impossible for him to get a fair trial in media-saturated New York City.

JURY SELECTION COMPLETED FOR HARVEY WEINSTEIN'S RAPE TRIAL

Meanwhile, Weinstein's attorneys foreshadowed their strategy to defend him against charges that he raped a woman in a New York City hotel room in 2013 and forcibly performed a sex act on another woman at his apartment in 2006. If convicted, he could get life in prison.

The defense has “dozens and dozens and dozens of loving emails to Mr. Weinstein” it wants to use to discredit witnesses, attorney Damon Cheronis told the Manhattan judge overseeing the trial.

HARVEY WEINSTEIN ARRIVES IN COURT AHEAD OF SEX ASSAULT TRIAL

Some of the women who claim they were victimized by the disgraced Hollywood mogul “also bragged about being in a sexual relationship with him,” Cheronis said.

Judge James Burke barred the defense from using the actual emails in a presentation planned for opening statements but permitted referring to the messages' “substance and content.”

HARVEY WEINSTEIN THREATENED WITH JAIL BY JUDGE AS RAPE TRIAL BEGINS ON HEELS OF NEW CHARGES

While the New York charges involve two women, scores of others also have accused the former studio boss behind such Oscar winners as “Pulp Fiction” and “Shakespeare in Love” of using his influence as a license to lure women to him and then sexually assault or harass them. The allegations became a jumping-off point for the #MeToo reckoning with sexual misconduct from the corridors of power to everyday offices, campuses and other settings.

Weinstein has denied wrongdoing.

His lawyers claimed fervent media coverage, loud protests and even the spectacle that surrounded supermodel Gigi Hadid’s brief appearance in the jury pool created a “carnival-like atmosphere” around the trial.

The negative publicity "is magnified tenfold by its dissemination in a city obsessed by news, politics and entertainment, the trifecta that is the Weinstein story,” defense attorney Arthur Aidala wrote in court papers last week. He asked that the trial be moved to largely suburban Suffolk County or to Albany, the state capital.

Manhattan prosecutors said the defense claims didn’t add up.

“The inhabitants of those jurisdictions have access to the same news sources and social media" as Manhattanites do, Assistant District Attorney Harriett Galvin wrote in a filing. She called the request to move the trial “a transparent attempt to delay the proceedings.”

CLICK HERE TO GET THE FOX NEWS APP

Galvin noted that the chosen jurors indicated they could be fair and impartial.

A jury of seven men and five women was picked last week to decide Weinstein’s fate in a selection process marked by discord, including defense objections over the inclusion of a woman who wrote an upcoming novel involving young women dealing with predatory older men.

The trial is expected to last at least six weeks.