(Craig Warga/Bloomberg News)

Two police officers accused of raping a teenager while she was in custody resigned on Monday, the New York Police Department said.

The two former NYPD detectives — Eddie Martins, 37, and Richard Hall, 33 — are facing dozens of criminal charges and a possible $50 million lawsuit after the teenager accused them of raping her while she was handcuffed inside a police van. The indictment followed a weeks-long investigation of the two former officers who, prosecutors said, pulled over a car driven by the 18-year-old, arrested her for drug possession, then took turns raping her in the back seat.

The resignation came three days before the officers were scheduled for a departmental trial, a separate proceeding from a criminal trial. During that process, officers are tried on charges of misconduct. A trial commissioner decides if they’re guilty and makes recommendations to the police commissioner.

In a sharply worded statement, New York City Police Commissioner James P. O’Neill said he would’ve immediately fired Martins and Hall if they’re found guilty at the departmental trial.

“And I would have done so on behalf of every NYPD cop, because we owe the communities we serve — as well as the honest, hardworking men and women of this department — nothing less,” O’Neill said.

He also said: “When a member of the NYPD is indicted on serious charges like these, it tarnishes all of the admirable things accomplished by other, good officers every day in neighborhoods across New York City. It also stains the legacies of those who paid the ultimate price in service to New Yorkers.”

John Arlia, Hall’s defense attorney, said Monday that both officers jointly decided to resign to focus on the defense of their case and avoid the distraction of an administrative proceeding, which typically happens after the criminal matter is resolved.

Martins and Hall, who were members of the NYPD’s Brooklyn South narcotics unit, have been charged with rape, sexual abuse, sexual misconduct, official misconduct and coercion. In total, they are facing 50 charges each.

DNA recovered from the victim after a rape-kit test matched samples taken from Martins and Hall officials said. Surveillance footage also showed the teen getting out of the police van about 40 minutes after she was pulled over, prosecutors said.

The arrests and the former officers’ arraignment hearing on Oct. 30 capped off weeks of serious allegations of misconduct that have been circulating in the media.

Acting district attorney Eric Gonzalez called the crimes a “flagrant betrayal of public trust” and vowed to hold the detectives accountable.

The detectives’ attorneys raised doubts about the teen’s account of what happened, suggesting during the court hearing that the encounter was not rape but consensual sex, the New York Times reported.

Prosecutors said the crimes occurred the night of Sept. 15, when the officers were riding in an unmarked Dodge Caravan as part of a buy-and-bust operation in South Brooklyn. The two detectives, who were in plain clothes at the time, left their post without their supervisor’s permission at about 7:30 p.m. and drove to a park in Coney Island, according to the Brooklyn district attorney’s office.

A little later, the officers pulled over the teen, who was with two male passengers, and found marijuana in the cup holder next to the front seat, prosecutors said. (The Washington Post generally does not identify people who are or may have been victims of sexual assault.)

They then handcuffed her and let the two passengers go before driving off with the teen in the back of the van, prosecutors said.

Before they left, the officers allegedly told the passengers to pick up their friend at the Coney Island police precinct in three hours.

While in the van, Martins called the teen’s friends from his cellphone and told them not to follow the police vehicle, Assistant District Attorney Frank DeGaetano said during the hearing, according to the Times.

As Martins sat in the back seat with the teen, he told her that he and his partner were “freaks” and asked what she would do to get herself out of trouble, prosecutors said. Martins then forced the teen to perform oral sex on him and raped her while Hall drove and watched in the rearview mirror, prosecutors said.

The teen cried and pleaded for the officer to stop, DeGaetano said in court.

The van allegedly stopped in Bay Ridge, roughly four miles from where the teen was pulled over. There, the officers switched places and Hall forced the teen to perform oral sex on him, prosecutors said.

The detectives then drove to the Coney Island precinct and dropped the teen off after ordering her not to talk about the incident, prosecutors said.

The young woman’s private attorney, Michael David, said his client has filed a notice of claim against the police department, the two former officers, their supervisor and the city of New York — the first step in filing a lawsuit. She’s seeking $50 million in damages, David said.

Mark Bederow, an attorney for Martins, said he was confident that the teen’s allegations will be “demonstrated to be false.”

“I would urge people to respect the presumption of innocence, which applies to anyone, including a police officer,” Bederow said, adding, “It will become crystal clear that Eddie Martins did not engage in any rape or forcible sex attack on the young woman.”

Arlia, Hall’s attorney, declined to comment about the case and, instead, referred to statements he’d made in court.

During the arraignment, Arlia called the indictment “schizophrenic,” saying there were contradictory charges against his client, the Times reported. Aside from the rape charges, Martins and Hall were also accused of receiving sex as a bribe. That, Arlia said, suggests prosecutors were not entirely confident that the young woman was raped.

Martins has been with the police department for 11 years and Hall for seven years, according to the NYPD. The department declined to comment further.

Both have been suspended without pay, according to media reports.

Before the indictments, the New York Post reported on a letter the defense lawyers reportedly sent to the district attorney’s office, urging prosecutors “to further investigate” the young woman’s “dubious claim” before asking a grand jury to reach an indictment — a standard practice in criminal cases in New York.

In their letter, the attorneys pointed to the young woman’s social media accounts, the tabloid reported, and cited what they described as a “provocative selfie.” They also stated that the young woman “rebranded” herself as a rapper named “Fi5ty Milli,” which they said was a reference to her $50 million lawsuit.

Bederow and Arlia declined to comment about the letter.

David, the teen’s attorney, said the defense was trying to “blame the victim” and “shame” her.

“Teenagers, they go on social media all the time: They post photographs, they post selfies, they say a lot of things,” he said. “That’s part of being a teenager. The fact that she posts selfies, or something that might be interpreted as provocative, that is not an indication of consent to being brutally raped.”

“She has the right to post whatever post she wants,” he said. “She has the right to wear whatever clothes she wants.”

The young woman has also used social media to speak out against Martins and Hall. David said she did so because she felt helpless and outraged that it took weeks for the two to be arrested.

Officials said she reported the incident immediately; the former officers were arrested six weeks later.

A spokeswoman for the district attorney’s office said in a statement that “the investigation into this case was done with remarkable speed considering the complex circumstances, including identifying the suspects, obtaining search warrants to collect DNA evidence, testing the DNA evidence, and making a comprehensive presentation to a grand jury that returned a 50-count indictment. We stand with this brave young woman who immediately reported this alleged attack.”

The case has also caught the attention of a New York City Council member who represents the district where the alleged crimes occurred.

Mark Treyger, the council member, said there’s a glaring loophole in the state’s penal code that does not explicitly prohibit police officers from having sexual contact with a person in custody.

The penal code prohibits sex between a corrections officer and an inmate, and between a parole officer and a parolee, but there’s no such provision about a police officer and an arrestee, Treyger said.

An inmate “cannot give consent to sex if they’re under the custody of a corrections officer,” he said. “But there’s a glaring omission with regards to people under police custody. There’s a power dynamic that leaves a person in custody completely powerless.”

Treyger said he’s planning to introduce language to change the penal code.

“If this was in the law, the case would’ve been shut and closed already,” he said. “Now the DA’s office has to prove a rape occurred, which is not easy to prove. And yes, they can be charged with official misconduct, but the penalties of that are nowhere near that of a rape charge.”

Martins and Hall, who are out on bail, are scheduled to appear in court in January.

This post, originally published on Nov. 2, has been updated.

Read more:

Fatal shootings by police remain relatively unchanged after two years

Former St. Louis police officer charged with murder in fatal 2011 shooting of black man

Want to reduce fatal police shootings? This policy makes a big difference.