Two former detectives with the New York City Police Department avoided jail time this week after being accused of kidnapping and raping an 18-year-old Brooklyn woman in a police van in 2017.

Former Brooklyn South narcotics detectives Eddie Martins, 39, and Richard Hall, 34, received five years’ probation on Thursday after cutting a plea deal in March. The officers, who were originally charged with rape, sexual assault and kidnapping, pleaded guilty to two counts of third-degree bribe receiving and nine counts of official misconduct.

On the original charges, Martins and Hall had faced up to 25 years in prison. With the plea deal, they faced a maximum of seven years.

“These defendants engaged in a shocking abuse of power which they finally acknowledged,” Brooklyn District Attorney Eric Gonzalez said in a Thursday statement. “While I would have preferred to see them serve prison time, they are no longer members of our police department and with today’s plea are convicted felons.”

The district attorney’s office pushed for the former officers to serve a one- to three-year jail term, but the sentence was handed down by Brooklyn Supreme Court Justice Danny Chun without prosecutors’ input.

The accuser’s attorney Michael David said in a statement to Gothamist that he and his client are “outraged” by the judge’s decision.

“If you’re arrested and kidnapped in a van with two large officers with guns, there’s no consent,” he said. “They’re getting away with rape. It sends a horrible message to victims of police sexual misconduct.”

The original rape and kidnapping charges were dropped earlier this year after the Brooklyn District Attorney’s Office cited “serious credibility issues” with the accuser, who goes by the pseudonym Anna Chambers to protect her identity. A rape kit, however, showed a positive DNA match with the accused men’s saliva and semen found on Chambers’ body after the alleged attack.

Both Martins and Hall admitted to having sex with Chambers, but defense attorneys argued that the sex was consensual. At the time, it was not illegal for police officers to have sex with someone in custody ― although that has since changed, in part because of this case.

Chambers told investigators in September 2017 that Martins and Hall pulled her over while she was driving with two male friends near Coney Island in Brooklyn. She said the two detectives found marijuana in her car and told her she was being arrested. Chambers said Martins and Hall let her two friends go, arrested her and drove away with her in an unmarked police van.