At least 36 people were killed in weekend clashes in Honduran prisons as the military and police try to regain control after a spate of murders linked to the criminal gangs plaguing the country.

On Sunday afternoon, 18 gang members died in a clash between inmates at El Porvenir prison, 60 kilometers (40 miles) north of the capital Tegucigalpa.

"Firearms, knives and machetes" were used in the brawl, which also left 10 wounded, Lieutenant Jose Coello, a spokesman for the National Inter-Institutional Security Force (Fusina), told local media.

On Friday night, 18 prisoners died and 16 were wounded in a shooting at the prison in the port town of Tela, northwest of the capital.

The killings came shortly after President Juan Orlando Hernandez -- grappling with a wave of prison killings -- ordered the army and the police on Tuesday to take control of the country's 27 prisons, which are badly overcrowded with some 21,000 inmates.

The security forces later said they were deploying about 1,200 military and police in 18 facilities classified as "high risk."

Hernandez announced the crackdown after the killings on December 14 of five members of the feared MS-13 gang by a fellow detainee at the high-security prison in La Tolva, east of Tegucigalpa.

That came just a day after Pedro Idelfonso Armas, the warden of Honduras's main high security prison in Santa Barbara, El Pozo, was shot dead in the south of the country.

The security ministry had suspended Armas shortly before his death, amid an investigation into his presence during the October 26 murder of Magdaleno Meza, a drug kingpin whose confession and notebooks linked him to the president's brother, Juan Antonio "Tony" Hernandez.

Meza's account books were used as evidence in the New York trial of Hernandez, who was subsequently convicted on four counts of drug trafficking. He faces sentencing -- possibly for life -- in January.

The president condemned the conviction of his younger brother, saying it was based on "the testimony of confessed assassins."

Honduras is plagued by drug trafficking, gangs, poverty and corruption and suffers from one of the highest homicide rates in the world outside areas of armed conflict
Honduras is plagued by drug trafficking, gangs, poverty and corruption and suffers from one of the highest homicide rates in the world outside areas of armed conflict AFP / Orlando SIERRA

A video circulating on social media shows the 52-year-old Armas talking with Meza when prison guards opened a locked gate, allowing a dozen inmates to burst in to stab and fatally shoot him.

In statements to the AFP, Meza's lawyer, Carlos Chajtur, publicly accused the government of having ordered his client to be killed in retaliation for having collaborated with US justice in the trial against Hernandez.

On Sunday night military and police chiefs told the press that the wave of violence inside prisons "is an escalation of the criminal world to try to prevent Fusina (...) from imposing the necessary controls in the country's penal centers".

The Office of the United Nations High Commissioner for Human Rights in Honduras (OHCHR) said it observed "with alarm the violence inside prisons", and urged the state "to guarantee the life and respect of human rights to those deprived of liberty and proceed to a prompt, effective and transparent investigation."

Honduras is plagued by drug trafficking, gangs, poverty and corruption.

It suffers one of the highest murder rates in the world outside areas of armed conflict, having registered 41.2 homicides per 100,000 inhabitants in 2018.

To fight this scourge, Hernandez created a military police force financed by a new tax, and built special prisons for gang members.

The sky-high crime rate has been a key factor behind a wave of migration toward the United States, notably by minors who say they fear being forced into gangs.