Mayor Eric Adams’ lawyers mounted a desperate 11th-hour bid to quash the criminal charges against him — including by arguing to the feds that his historic prosecution would be ruinous for the city.

A behind-the-scenes Sept. 12 missive — exclusively obtained by The Post — was sent from Adams’ legal team to Manhattan prosecutors before the historic federal indictment against Hizzoner was unveiled Thursday and provides a detailed glimpse into the mayor’s defense.

The feds’ case — based on accusations that Adams accepted bribes and illegal straw donations to his 2021 mayoral campaign from Turkish nationals — is on flimsy legal ground, especially after a recent US Supreme Court ruling that significantly narrows what counts as a bribe, the mayor’s lawyers argued in the letter.

Such supposedly shaky prosecution would not only be ruinous for Adams’ career but also detrimental for New York City and the 750,000 voters who put him into Gracie Mansion, they argued.

“We urge the Department to decline prosecution of Eric Adams in the interests of justice,” the lawyers wrote.

Mayor Eric Adams’ lawyers mounted a last-ditch effort to quash the historic criminal case against him, to no avail, a letter shows. REUTERS

A stone-faced Adams pleaded not guilty Friday in Manhattan federal court to a slew of corruption charges, ranging from bribery to conspiracy to wire fraud.

His lawyers’ last-ditch push to try to head off what is shaping up as an unprecedented criminal trial occurred in the weeks before.

In the recent letter, Adams’ lawyers bemoaned their limited, one-way exchanges with prosecutors from US Attorney Damian Williams’ Southern District of New York office during the 10 months since federal agents began dramatically raiding the mayor’s allies’ homes and seized his electronic devices, according to the letter.

Once Williams authorized bribery and campaign-finance-violation charges, Adams’ team went into overdrive to undercut the accusations — arguing prosecutors had failed to identify the legally necessary actual quid pro quo.

The feds contend that Adams — after raking in more than $100,000 of travel perks such as business-class flight upgrades and luxury hotel stays — returned the favors of foreign officials including by pushing FDNY officials to allow a 36-story skyscraper housing the Turkish consulate to open without a fire inspection.

But Adams’ lawyers contended that situation fails to meet the definition of quid pro quo bribery.

The Supreme Court had recently set a high, narrow bar for what counts as bribery — requiring a direct line between a bribe and action by an elected official, the lawyers argued.

Adams’ years of flight upgrades and other perks from Turkish nationals don’t count as a “quid” given that the alleged “quo” — the greased fire inspection on the Turkey tower — was for a foreign official who didn’t hold his post until afterward, the letter contends.

The letter provides hints at Adams’ defense strategy a la lawyer Alex Shapiro. Getty Images

The argument echoes one that tanked the first public corruption case against former New Jersey Sen. Bob Menendez, who was left off the hook in 2015 when a judge tossed the charges on the basis that prosecutors failed to show an explicit quid pro quo.

But prosecutors working under Williams, who is pursuing the case against Adams, apparently learned their lesson when they pursued a separate, new bribery case against Menendez.

Menendez was convicted in July in no small part because prosecutors showed the $150,000 worth of gold bars found in his bedroom were an explicit bribe from foreign governments for favors.

Adams’ team argued in their letter that his flight upgrades from Turkish Airlines were par the course to encourage VIP travel on the airline and that New York City hadn’t even done business with the carrier.

“There is no evidence that the Mayor accepted upgrades intending to be influenced in any way, much less regarding entirely unrelated constituent service-driven assistance with a permit issue,” the letter argues. “Upgrades as a quid also fail because receipt of complimentary flight and hotel upgrades in connection with personal travel did not violate New York City ethics rules.”

The mayor’s legal team continued to try to undercut the federal case by taking aim at the feds’ “key witness,” Rana Abbassova, who served as Adams’ liaison to the Turkish community and arranged much of the travel cited in the indictment.

The letter also argues that the alleged straw donations to Adams’ campaign from Turkish nationals were a minuscule part of his entire haul. The then-Brooklyn borough president didn’t know of any foreign donations and had even warned his staff against accepting any, it contends.

“The campaign received more than $10 million in contributions from more than 15,000 contributors, and there was no incentive to conspire to receive corrupt contributions in the summer of 2021,” the letter states. “The Mayor repeatedly trained his campaign staff not to accept foreign donations, the donations identified by SDNY constitute approximately 0.4% of the overall funds raised, and he had no reason to suspect any foreign donations were in fact being made.”

Adams’ lawyers closed the letter by arguing the Southern District’s case against former New York Lt. Gov. Brian Benjamin was a “cautionary tale.”

A judge tossed bribery raps against Benjamin that were based on accusations he accepted campaign contributions from a real estate developer in exchange for steering state funds to a nonprofit the donor controlled.

Federal appellate judges later reinstated the charges, finding they were an “explicit quid pro quo,” prompting an appeal before the Supreme Court.

“Regardless of the outcome of the appeal, Brian Benjamin’s political career has ended,” the letter states. “A similar fate would face Mayor Adams if he were charged here based on evidence that is far less compelling.”