The Manhattan DA’s office once went to bat for billionaire pervert Jeffrey Epstein, after botching a review of his sex crimes and swallowing his lawyers’ claim that “there are no real victims here,” records obtained by the Post show.

Assistant DA Jennifer Gaffney, then-deputy chief of Cyrus Vance Jr.’s sex-crimes unit, in January 2011 asked a Manhattan judge to downgrade Epstein’s status in the New York sex-offender registry from the most-dangerous Level 3 to least-restrictive Level 1.

The judge was stunned.

“I have never seen the prosecutor’s office do anything like this,” Manhattan Supreme Court Justice Ruth Pickholz told Gaffney. “I have done many [cases] much less troubling than this one where [prosecutors] would never make a downward argument like this.”

Pressed by the judge, Gaffney admitted that she never spoke to the Florida U.S. Attorney who handled a sprawling sex-crime investigation into the financier.

“I don’t think you did much of an investigation here,” Pickholz said. “I am shocked.”

Vance’s mishandling of the Epstein hearing has come under new scrutiny after a Miami Herald report last week revealed a secret “non-prosecution agreement” in Florida that buried evidence Epstein had allegedly pimped out 80 girls and young women to his rich and powerful pals.

The DA’s office insists Vance “was not aware” of the hearing until years later and had nothing to do with it.

“Our prosecutor made a mistake,” Vance spokesman Danny Frost said of Gaffney.

Gaffney, a prosecutor working in the Harvey Weinstein probe, left the DA’s office in September. She declined to comment.

A DA insider said the office was unaware of Epstein’s secret plea deal in Florida, and never investigated his sexcapades in NYC.

Some law enforcement sources don’t believe Vance had no clue that his office had a sex-offender case involving a Manhattan mogul with close ties to Democrats.

“This is very unusual,” one said. “There is no way Vance didn’t know. The question is why — and who asked for the favor.”

The FBI found Epstein recruited girls as young as 13, many runaways, from Florida, New Mexico, the Caribbean and New York, and paid them for nude massages that often led to sex, the Herald reported. Some girls worked for a Manhattan modeling agency and lived in a nearby apartment owned by Epstein.

But Miami U.S. Attorney Alexander Acosta — now President Trump’s labor secretary — sealed a 53-page federal indictment that could have sent Epstein to prison for life, the Herald reported.

Instead, Acosta let Epstein plead guilty to procuring a person under 18 for prostitution. Sentenced to 18 months, he served just 13 — most of it in his tony Palm Beach office.

Epstein was required to register as a sex offender in New York because one of his many homes is in Manhattan.

In the Jan. 18, 2011 hearing, Gaffney argued the evidence didn’t justify the harshest status.

“There is only an indictment for one victim,,” she said. “If an offender is not indicted for an offense, it is strong evidence that the offense did not occur.”

Pickholz rejected Gaffney’s arguments and gave Epstein the highest sex-offender status – Level 3.

When Epstein appealed, Vance’s office admitted it had misread the law.

The appellate court upheld Pickholz, saying Epstein “committed multiple offenses against a series of underage girls,” and that the victim in his indictment “was only one of defendant’s many victims.”