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 a once-celebrated movie producer now vilified as a predator by scores of women, including some well-known actresses who plan to testify or attend the trial.

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 s imilar 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.

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, the 67-year-old 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.

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.

ADVERTISEMENT

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.”

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.”

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. Later, Weinstein is to answer rape and sexual assault charges in Los Angeles. Those charges were filed this month as jury selection in his New York trial was getting underway.