A federal informant claims that the mob lawyer who helped John “Junior” Gotti score three hung juries was involved in a drug-dealing operation inside a Brooklyn lockup, according to stunning new court papers.

The jailhouse snitch said attorney Charles Carnesi, who died earlier this year, provided reputed Luchese soldier Christopher Londonio with confirmation of deposits into commissary accounts and tracking numbers from Western Union for payments tied to the sale of synthetic marijuana and cigarettes at the Metropolitan Detention Center, legal papers filed by Londonio say.

The informant alleged in 2017 that Londonio, who was Carnesi’s client at the time, confessed to peddling the contraband with members of the Bloods gang while they were all locked up in the MDC, according to the White Plains federal court filing.

Carnesi – who portrayed himself in last year’s movie “Gotti,” which starred John Travolta as the late “Dapper Don” John Gotti – died of pancreatic cancer February 27. He was 69.

Carnesi represented Junior Gotti at three of four racketeering trials that all ended in hung juries, including the last one in 2009, after which federal prosecutors threw in the towel against the Mafia scion.

Fellow lawyers who knew Carnesi ridiculed the allegations against the former Brooklyn prosecutor.

“It sounds like a bunch of nonsense,” said Tom Harvey, actor Robert De Niro’s longtime personal attorney.

“I do not believe it and if it were true, why didn’t the government step in and do something about it?”

He added: “It’s sad that Charlie passed away; he’s not able to defend himself.”

Lawyer Seth Ginsberg, who assisted Carnesi on the Gotti cases, called it “outrageous that this allegation is being made.”

“Charlie Carnesi had the highest integrity and ethics, and would never violate the law for any reason, let alone on behalf of a client,” said Ginsberg, who represents a former co-defendant of Londonio’s.

“I am confident that Charlie’s reputation will be vindicated, as it should.”

Lawyer Matthew Mari said that “anyone who knew Charlie would laugh at the idea that he would do something like that.”

“Charlie was a man of great integrity and honor, and I think that a person who would make up a story like that is destroying his own credibility,” he added.

Younger brother Frank Carnesi said that his sibling “represented both sides of the law and had the highest integrity and respect for the law.”

“He would never bend or break the law, and he expected that of everyone he worked with,” Frank Carnesi said.

Londonio revealed the allegations against Carnesi in a bid to delay his scheduled Oct. 2 trial on charges that include the 2013 slaying of former “Purple Gang” leader Michael Meldish, in which Londonio allegedly served as the getaway trial.

His co-defendants include reputed former Luchese street boss Matthew “Matty” Madonna, who’s accused of ordering the hit, and reputed former Luchese underboss Steven “Stevie Wonder” Crea Sr., who was allegedly in on the planning.

Londonio claims that prosecutors “purposely concealed” the informant’s claims about Carnesi for more than two years before finally revealing them last week, even though the allegations, if true, would have created a conflict of interest barring him from the case, court papers say.

“For sure, Mr. Carnesi could not have properly advised Mr. Londonio about this matter during his role as lead counsel, nor could he have engaged in proper pre-trial strategy if he was truly involved in the charged criminal acts,” wrote Londonio’s new lawyer, John Meringolo.

Londonio has previously said in court papers that the informant “has a long, documented of mental health and medical issues” that include having “purposely ingested both a razor and a metal screw” and being put on suicide watch around the time he was making his claims against Carnesi in August 2017.

The informant, identified by a source as David Evangelista, 44, is currently awaiting sentencing for robbing two banks in November 2016, days after escaping from a Bronx halfway house.

At the time of his escape, Evangelista was finishing up a 12-year-plus sentence for robbing two Manhattan banks in October 2005.

In court papers responding to Londonio’s filing, federal prosecutors said that while Evangelista said he “received tracking numbers from Carnesi,” he “never conveyed the belief, and Londonio does not claim, that

Carnesi had any knowledge of what these proceeds represented.”

There’s “no evidence of a crime by Carnesi,” prosecutors said, adding that “assisting imprisoned clients in

financial interactions with the outside world is…normal conduct for many defense attorneys.”