With inmates wielding machine guns, rifles and grenades and guards often unwilling to enter the overcrowded buildings for fear of their own death, jails in Venezuela have become a lawless territory that magnify the violence outside their walls. More than 500 people were killed in Venezuela’s notoriously dangerous prisons last year, according to a local charity.

Inside one prison in Caracas a few months ago, I witnessed prisoners brandishing huge guns, sharpening knives and tossing grenades around as they listened to blaring music and smoked marijuana.

“I've seen a man have his head cut off and people play football with it,” one prisoner told me, as the walls around us told their own story with hundreds of bullet holes and scorch marks.

Riots regularly take place. One at El Rodeo last June, just outside Caracas, led to a month-long standoff where thousands of soldiers were pitted against inmates while crowds of distraught women screamed outside in anger and dispair.

Carlos Nieto, a local lawyer and human rights advocate, described the El Rodeo siege as “one of the most violent events to have occurred in a Venezuelan jail in the past 10 years.”

Nieto added: “We face a truly serious prison crisis in which the state has not shown up with solutions and this has led to chaos.”

The problem predates President Hugo Chávez, who himself was locked up after a failed coup attempt in February 1992 — six years before he came into power. He was disgusted with guards who failed to intervene as a man was raped and murdered in a nearby cell, according to Bart Jones' biography of the socialist leader, "Hugo."

Overcrowding is the key issue. The country’s prisons are meant to hold around 12,500 people but rather house nearly 50,000.

In August, a newly-appointed prisons minister, Iris Varela, said she would see to the release of around 20,000 of those prisoners. “In prison there are people that do not pose a danger to society,” she said. “They can be handled outside prison.”

However, outside prison is one of the world’s highest murder rates. According to InsightCrime, there were 18,850 murders last year, up 30% on the previous year. Other counts give higher figures and the capital city is often cited as more murderous than many warzones.

"I want to promise the Venezuelan people that we won't let the wolves loose," Varela said.