Two NYPD detectives have quit the force after being charged with raping a restrained 18-year-old girl in the back seat of a police van.

Officers Eddie Martins, 37, and Richard Hall, 32, formerly assigned to Brooklyn South Narcotics Division, arrived at Police Headquarters on Monday morning and resigned their positions, the NYPD announced today.

Martins and Halls had been suspended without pay following their arrests last week. Had they decided to stay on the force, they would have faced a departmental trial on top of the criminal case.

The pair have been charged with first-degree rape, first-degree criminal sexual act, second-degree kidnapping, official misconduct and related counts.

Scroll down for video

Out: NYPD Detectives Richard Hall (left) and Eddie Martins (right) on Monday quit their jobs, a week after being arraigned on rape charges involving a teenage girl

Hall and Martins after accused of forcing this 18-year-old girl to perform sex acts while handcuffed in the back of a police van

Martins and Hall were released last week after posting $250,000 and $150,000 bail, respectively. Both were ordered to return to court on January 18, 2018. If convicted, they each face up to 25 years in prison.

In court, their defense lawyers said they were planning to fight the charges.

'We don't believe they have the evidence to support the majority of charges that are alleged,' said Mark Bederow, who represents Martins.

The defense team hinted that the alleged victim's social media postings, among them photos of the teenager striking provocative poses in skimpy outfits, could be used to dispute her claim that she was forced to have sex with the officers.

Attorney Michael David, who represents the 18-year-old woman, responded by hitting out at his adversaries for engaging in victim-blaming.

'Whatever she posts, however she dresses, whatever she does, has nothing to do with the brutal rape that was done on her,' he told PIX11. 'They should stop smearing her, they should stop shaming her, they need to stop blaming this victim.'

David also said that his client was 'not happy' that Martins and Hall were freed on 'low bail,' and described her to NBC New York as 'an emotional wreck.'

On Monday, the 18-year-old shared a link to a story about her alleged assailants' resignation from the NYPD, accompanied by a status update that simply read: '!!!!!!'

Martins, 37, is accused of forcing the victim to perform a sex act on him, and then raping him in the back seat of a police monivan while his partner watched

Both Martins (pictured) and his partner could each face up to 25 years in prison, if convicted

Hall (pictured) was ordered held on $150,000 bail, while Martins' bail was set at $250,000

The 37-year-old detective (pictured Monday) and his partner were assigned to the NYPD's Brooklyn South Narcotics squad

'It is incomprehensible that two veteran NYPD detectives would allegedly commit such an outrageous act,' Acting Brooklyn District Attorney Eric Gonzalez stated last week. 'They took an oath to protect and serve, but allegedly violated that oath by raping a young woman who was in their custody.

'We will now seek to hold them accountable for this flagrant betrayal of public trust.'

The 18-year-old victim, who tweets under the name Anna Chambers, alleges that one NYPD detective raped her and both forced her to perform oral sex in a Chipotle parking lot after she was caught smoking marijuana on September 15.

The woman confirmed to DailyMail.com over the weekend that she is the victim and gave permission for her name and photos to be published.

A grand jury voted on Thursday to indict the officers after listening to a week of testimony, including the accuser taking the stand.

The two detectives, assigned to the NYPD's Brooklyn South Narcotics, did not deny the sexual acts but claimed they were consensual.

According to a press release from the DA’s office, on September 15, at around 7.30pm, Martins and Hall, who were on-duty and riding in a Dodge Caravan as part of a team of plainclothes detectives conducting a buy-and-bust operation in the 60th Precinct, left their post without authorization and drove to Calvert Vaux Park in the Gravesend section of Brooklyn.

Just after 8pm, the officers pulled over an Infinity Coupe driven by the 18-year-old accuser with two male passengers, according to Gonzalez’s office.

After observing some marijuana in a cup holder, Hall and Martins ordered the two men and woman to get out of the car and asked if they had any drugs on them, according to the investigation.

The 18-year-old woman admitted to be in possession of marijuana and two Klonopin pills, after which the detectives put her in handcuffs, told her she was under arrest and would be getting a desk appearance ticket.

They let her male companions go and instructed them to pick up their friend from the precinct in three hours’ time, according to the press release.

A short time later, the detectives told the teenager to call her friends and tell them not to follow their police minivan.

‘Detective Martins allegedly told the young woman he and his partner are “freaks” and asked her what she wanted to do to get out of the arrest,’ the press release stated.

The charges come after the officers spent last week attempting to discredit the woman, claiming that she posted 'provocative' selfies to her Instagram and Twitter after the alleged attack

It is alleged that Martins then forced the handcuffed girl to perform a sex act on him while seated in the back seat of the van as his partner Hall drove and watched through the rear view mirror. Martins then allegedly raped the victim.

When the cops reached Bay Ridge, about 4 miles from the site of the traffic stop, Martins and Hall allegedly swapped places, with the former getting behind the wheel and the latter getting into the back seat, where he allegedly forced the 18-year-old to perform a sex act on him as well.

Martins and Hall then drove back to the vicinity of the 60th Precinct in Coney Island and had the victim call her friends again to tell them she was being let go.

‘They allegedly gave her back the Klonopin pills, told her to keep her mouth shut and released her,’ the statement read.

The 18-year-old told her friends what happened and, later that evening, was taken to Maimonides Hospital, where a rape kit was prepared. DNA recovered from the victim was a match to both Martins and Hall.

After the allegations broke they and their supervisor were placed on modified duty and stripped of badges and guns. The two officers have since been suspended without pay.

Martins (pictured left) and Hall did not deny they had sex with the woman (right), but claimed it was consensual. They have been suspended without pay

Hall (pictured with his lawyer) and Martins allegedly told the victim they were 'freaks'

Mark Bederow, Martins' attorney, said: 'The dynamic will change when there are court proceedings. The allegations repeatedly and publicly alleged by the plaintiff’s lawyer will need to be supported by credible evidence and withstand scrutiny.'

The indictment comes after the officers spent last week attempting to discredit their accuser in a letter to prosecutors.

The letter observed how she filed a $50million claim against the city earlier this month and has posted 'provocative' selfies on her Instagram and Twitter after the alleged attack.

The defense lawyers for the officers urged prosecutors 'to further investigate Chambers' dubious claim before you ask the grand jury to return an indictment against Martins and Hall.'

The teen took to Twitter to express her dismay that the officers claimed the sex acts were consensual, including sharing a DailyMail.com article about the horrifying claims.

'She was shocked that the [cops] would say it was consensual after everything that was done to her. She wanted to get the word out,' her lawyer Michael David told the New York Post.

'She just wants everybody to know it's an absolute lie that this was consensual. She was raped. She was viciously, brutally raped in handcuffs. It's the truth.'

'She's embarrassed. She's very depressed over this. Her whole life had changed after this experience. She's afraid of the police, and she really wants justice to be served here.'

The young woman sought help from NYU Langone Hospital, in New York, after the incident.

She also spoke to a friend about the alleged sexual assault and reported it to the police.

The alleged rape and sexual assault is said to have taken place on Coney Island (file picture)

The teenage girl claims that an NYPD detective raped her and another forced her to perform oral sex after she was caught smoking pot in Coney Island (file image)

'There was zero consent,' David said. 'The cops were over 6 feet tall. She's very petite, like 5-2 and maybe 100 pounds. There's nothing she could do.'

One of the male friends she was with went to the police station about a half-hour after he was released by the cops. He had been told the officers were taking the woman there, but no one had been brought in.

He left the station and found the woman visibly upset and waiting by his car.

'Her hair was a mess, and she ran up to me and gave me a hug, and she was like, "They f****d me. They f****d me,"' he said.