An MS-13 gang member pleaded guilty Monday to the murder of four rival gangbangers on Long Island last year, admitting he was one of the men who butchered and bludgeoned the victims with blades and tree limbs.

Josue Portillo, 17, pleaded guilty to four counts of racketeering murder and one count of conspiracy to commit racketeering in federal court in Central Islip for the April 2017 slayings of Justin Llivicura, Michael Lopez, Jorge Tigre and Jefferson Villalobos.

“Myself and another MS-13 member personally murdered Michael Lopez by stabbing him with knives. I did this knowingly, willfully and without coercion when I was 15 years old,” Portillo said quietly in court, where he appeared unshaven and uncuffed in green and white striped prison scrubs.

“I will forever suffer the pain of knowing how senseless these murders were and that none of the victims deserved to die.”

In May, family members of the victims had joined President Trump at a press conference calling for tougher immigration laws. The president asked them to stand and be recognized and shook their hands.

Portillo — an undocumented immigrant from El Salvador also known as “Sparky” and “Curioso” in the gang — was in ninth grade when he helped plan and carry out the gruesome quadruple murder but is being prosecuted as an adult and faces life behind bars.

He admitted that he and his buddies schemed to have two female MS-13 associates lure five suspected members of the rival 18th Street gang to the wood, where they ambushed the men with machetes, knives, sticks and an ax.

“We tricked the victims so they would go into the woods where they would be murdered,” Portillo told the judge when pushed for details, adding that he personally had “a blade.”

One of their targets managed to escape — and is now a government witness — but the other four were killed in a scene the feds described as a “horrific frenzy of violence.”

Portillo showed little emotion as he appeared in court Monday but said he was sorry for what he did.

“I apologize to the families of the victims, knowing my apology will not be accepted,” he said as some the family members wept.

Nine others have been charged over the incident, but Portillo is the first to plead guilty.

He does not have a plea deal with the government, according to the feds.

In a statement, his lawyer said he hopes the mea culpa will dissuade others from joining the brutal gang.

“We trust that his guilty plea will discourage others from joining MS-13,” said attorney Joseph Ryan Jr.

Portillo is scheduled to be sentenced Jan. 10. He is subject to deportation from the US once his prison term is done.