A suspected member of notorious street gang MS-13 has admitted he raped and killed a Muslim teenager last year as part of plea deal that would take the death penalty off the table.

Darwin Martinez-Torres, 25, of Sterling, Virginia, pleaded guilty on Wednesday to eight counts, including capital murder, related to the June 2017 slaying of 17-year-old Nabra Hassanen.

She had been out with a group of friends eating a pre-dawn meal at a fast-food restaurant ahead of Ramadan services at a local mosque.

Darwin Martinez-Torres, 25 (left), has pleaded guilty to eight counts, including capital murder, in the June 2017 slaying of 17-year-old Muslim girl Nabra Hassanen (right)

Martinez-Torres was driving by and got into a dispute with the group.

Prosecutors said the undocumented immigrant from El Salvador struck Hassanen with a baseball bat, raped her, then killed her and threw her body in a pond.

Under the conditions of Wednesday's plea agreement, Martinez-Torres will be sentenced to life in prison without possibility of parole.

Nabra's death attracted widespread attention amid concerns that her slaying was motivated by anti-Muslim sentiment, though police have said repeatedly they have no evidence of a hate crime.

Pictured is the Sterling, Virginia pond in which Nabra's body was found

Nabra (left and right) had been out with friends eating McDonald's ahead of a Ramadan service when Martinez-Torres struck her with a bat, raped, killed and threw her in a pond

Police have said Hassanen was out with a group of more than a dozen friends at about 3.40am on June 18, 2017.

The group was walking back to their mosque, the All Dulles Area Muslim Society, after eating at a McDonald's ahead of a daylong fast for Ramadan.

Nabra and a group of about 15 friends were dressed in abayas, or robe-like dresses worn by some Muslim women. Her mother said she didn't usually opt for traditional Muslim clothes but was wearing one that night for the overnight prayer service.

Martinez-Torres was driving by when he got into a dispute with a teenage boy on a bike.

He then got out of the car and started chasing the group of teens with a baseball bat.

Martinez-Torres was 'so enraged over the traffic dispute that it escalated into deadly violence,' police said.

Following Wednesday's plea hearing, Hassanen's father (pictured right alongside his wife) told reporters he had placed the case in God's hands

Hundreds of friends and supporters of Nabra Hassanen held a rally outside the Fairfax County Courthouse in Fairfax ahead of an earlier hearing for Darwin Martinez Torres

Nabra is believed to have tripped on the hem of her robe as she was running and fell, causing Martinez-Torres to catch her.

Martinez-Torres allegedly the bludgeoned her with a baseball bat.

She died from blunt force trauma to the head and neck, according to the medical examiner.

Martinez-Torres’ defense team argued that he has a low IQ and is intellectually disabled from being exposed to toxins from a gold mine that was in close proximity to his home in his native El Salvador.

Had the case gone to trial, prosecutors were prepared to introduce evidence that the defendant was a member of the ruthless street gang MS-13, reported the Washington Post.

Martinez-Torres has been living in the US illegally and ICE placed a detainer on him following his arrest, raising the possibility of a deportation.

Following Wednesday's plea hearing, which was attended by a large contingent of Hassanen's family, her father Mohmoud Hassanen held an emotional press conference telling reporters through an interpreter that he had placed the case in God's hands, reported Fox 5 DC.

In a court hearing last year, her father had to be held back as he shouted: 'You killed my daughter.'

Her mother, Sawsan Gazzar, threw a shoe at the suspect, shouting: 'I'll kill you!'

Mohmoud previously told theGuardian: 'He killed my daughter because she is Muslim. That’s what I believe.'