An admitted member of MS-13 was indicted Friday in the 2016 murder of a Long Island teen who was beaten so badly that he was “virtually unrecognizable,” prosecutors said.

Elmer Gilberto Santos Contreras, an illegal immigrant from El Salvador, was hauled into Suffolk County Supreme Court to plead not guilty to second-degree murder charges that could land him behind bars for up to life.

Suffolk County District Attorney Timothy Sini said he ordered a “hit” on Estiven Abrego-Gomez, 18, of Greenlawn, in August 2016 “after the victim was reportedly seen on social media flashing gang signs of the 18th Street gang, which is a known rival of the MS-13 gang.”

“This is a dangerous homicidal sociopath that we are not simply going to let walk out the door, go back to El Salvador and potentially illegally re-enter the United States,” Sini said at a press conference.

Abrego-Gomez’s cause of death was determined as sharp force injuries and blunt-force trauma. Contreras, 23, allegedly admitted to the murder while being held by US Immigration and Customs Enforcement on deportation proceedings in Virginia, Sini added.

In court, principal assistant prosecutor Kathleen Kearon divulged details of the gruesome slaying, including that the victim’s hands were nearly sliced off.

“The decedent was virtually unrecognizable,” she said.

Contreras’ lawyer Christopher Gioe denied the allegations.