The two former NYPD officers who dodged rape raps involving a young Brooklyn woman that could have put them behind bars for 25 years took a plea deal Thursday that will let them stay out of jail altogether, The Post has learned.

Ex-cops Eddie Martins and Richard Hall pleaded guilty in Brooklyn Supreme Court to 11 counts of felony bribe receiving and misdemeanor official misconduct, Martins’ lawyer confirmed.

They will serve five years’ probation but no jail time under the plea, which was held off the official court calendar at the request of defense lawyers and kept under wraps by prosecutors, whose press office did not tell the media that the high-profile defendants would appear before a judge.

The cops’ accuser was also not told of the hush-hush plea deal, her lawyer said.

Prosecutors — whose request that the cops serve between one and three years prison was denied — later confirmed the plea deal to The Post. Sentencing is set for Oct. 10.

The 11 charges had carried a maximum of seven years in prison.

The accuser — who has spoken publicly about the case under the alias “Anna Chambers” — will be outraged, her lawyer said when told of the deal by The Post.

“They’re getting away with rape,” said the lawyer, Michael David.

“They raped my client and they’re not getting any jail time?” he asked, incredulously. “That’s outrageous.

“That sends a horrible message, that they can kidnap people off the street, rape them and get away with it,” he added. “That sends a horrible message for victims.”

Indeed, Chambers tweeted her objections in no uncertain terms: “F— the justice system Imfaooo sh–s a joke.”

Martins and Hall have admitted they had sex in their police van with Chambers, who was then 18 years old, after a drug bust in Coney Island in 2017 — but the two cops have insisted it was consensual and that Chambers wasn’t handcuffed.

Chambers has in turn insisted the sex was forced.

The two disgraced cops were originally facing rape and kidnapping charges, but the charges were dropped in March.

“This case was botched from day one,” Martins’ lawyer, Mark Bederow, told The Post.

“This was never a rape case. They never should have allowed these men to be smeared as rapists and whatnot. Rather than follow the evidence, which quickly established that she was fabricating everything about the encounter, they caved to political pressure and abdicated their professional responsibility.”

Bederow also said that in asking for an earlier, off-calendar date for the plea, the defense was not trying to shield the ex-cops from the press.

“We had no opinion one way or the other whether the public was present for the fact that they were going to receive no-jail sentences,” he said. “The better question is why didn’t the DA notify the press that there was a high-profile case on the calendar, as they customarily do.”

District Attorney Eric Gonzalez said in a press statement Thursday that his office had hoped the two cops would serve prison time for their “shocking abuse of power, which they finally acknowledged.”

But Gonzalez also alluded to “serious credibility issues” on the part of Chambers.

Martins’ semen had been recovered from Chambers’ vagina, and Hall’s semen was recovered from her mouth, prosecutors had said in a January court filing — but the same filing pointed out that Chambers had also made false statements under oath.

“As a result of this disturbing incident, New York passed a law to prohibit police officers from having sex with people in their custody, closing a loophole that had allowed officers to claim that the sex was consensual,” the DA’s press statement said.

“We could not apply the new law retroactively, and serious credibility issues in this case precluded us from proceeding on additional charges, yet we remained committed to holding these defendants accountable.”