A Mexican judge on Tuesday sentenced a 14-year-old U.S. citizen to three years in prison for homicide, kidnapping and drug and weapons possession.

Authorities said the teenage boy confessed to killing four people, after police found four headless bodies suspended from a bridge, in the tourist city of Cuernavaca.

Edgar Jimenez Lugo, known as El Ponchis (the cloak), was given the maximum sentence allowed for a minor in the central state of Morelos, said José Manuel Serrano Falmerol, the state prosecutor.

After the teenager was arrested, authorities said he confessed to working for the South Pacific drug cartel, led by a well-known and feared drug baron called Hector Beltrán Leyva.

Once in front of federal prosecutor, the boy remained calm and coldly calmly acknowledged participating in four killings.

However, the boy declared he was at the time drugged and under threat.

The bodies were found In November and stories of a young and pre-teen "hit boy", spread on the web after a YouTube video appeared showing boys posing for the camera next to corpses and guns was posted on the social network.

Surprisingly, one of the boy in the video openly said that El Ponchis was his accomplice.

Jimenez was born in San Diego, California and was arrested in December as he and one of his sister tried to board a plane to Tijuana, hoping to cross the border to be reunited with their mother who lives in in San Diego.

The teenager has been in a juvenile detention centre in Morelos since his arrest and will serve his time there, Serrano said.

Jimenez and his sister are thought to have worked for Julio "El Negro" Padilla, a reputed drug trafficker who authorities suspect of fighting for control of the drug trade in Morelos.