NEW YORK (1010 WINS) -- Two former NYPD officers who had sex in a police van with an 18-year-old woman they'd taken into custody in 2017 -- she claimed it was rape, the officers claimed it was consensual -- took a plea deal Thursday, pleading guilty to receiving a bribe and official misconduct in exchange for five years probation instead of a prison sentence.

Eddie Martins and Richard Hall pleaded guilty in Brooklyn Supreme Court to 11 counts of receiving a bribe, a felony, and official misconduct, a misdemeanor.

Those charges carried a maximum of seven years in prison. They will officially be sentenced to five years probation on Oct. 10.

Brooklyn District Attorney Eric Gonzalez said in a statement, "These defendants engaged in a shocking abuse of power which they finally acknowledged. 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."

Gonzalez continued, "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 the sex was consensual. 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."

On Sept. 15, 2018 at 7:30 p.m., Martins, 39, and Hall, 34, were on-duty and riding in a Dodge Caravan, working as part of a team of plainclothes detectives assigned to Brooklyn South Narcotics and conducting a buy and bust operation in the confines of the 60th Precinct, the Brooklyn District Attorney's Office said.

The officers left their post without authorization and drove to Calvert Vaux Park in Gravesend, Brooklyn.

Just after 8 p.m., the officers conducted a car stop of an Infinity Coupe driven by an 18-year-old woman with two male passengers. There was a quantity of marijuana in the front seat cup holder. The officers instructed the three occupants to step out of the car and asked if they had any drugs on them, according to the investigation. The young woman responded she had marijuana and two Klonopin pills. The detectives handcuffed the woman, told her she was under arrest and would be getting a desk appearance ticket. They let her companions go, the evidence showed.

After leaving the park, while inside the police van, the woman had sexual intercourse with Martins and performed a sex act on Hall, according to the evidence. The defendants then drove back to the vicinity of the 60th Precinct in Coney Island and released the woman, giving her back the Klonopin pills. They did not report the incident to their supervisor or to anyone else and had no authority to rescind the arrest or to release the detainee, according to the indictment.

DNA recovered from the woman was a match to both of the defendants. Video surveillance shows the woman exiting the police van at approximately 8:42 p.m., the investigation found.