At least 54 people have been killed and 88 more wounded in a riot at one of Venezuela's most dangerous prisons.

Prisons Minister Iris Varela said that the riot was triggered by local media reports that soldiers had been sent to Uribana prison in Barquisimeto to search for weapons.

It appears that prisoners who heard the reports were waiting for the National Guard when they arrived.

TV footage showed National Guard troops surrounding the jail as prisoners in bloody clothes were taken out of the complex.

Outside, relatives of the prisoners, many of them women, waited anxiously for news of their loved ones.

Hospital director Ruy Medina told the AFP news agency that some 90 people were injured, mostly from gunshot wounds. Among the dead are a pastor and a member of the National Guard - the rest are believed to be inmates.

Venezuelan human rights activist Carlos Nieto Palma told the BBC: "What should have been a normal procedure in any prison ended in a clash between National Guard [soldiers] and inmates."

Opposition leader Henrique Capriles blamed the violence on "incompetent and irresponsible government".

Venezuela's prisons are notorious for overcrowding and the ready availability of weapons and drugs.

It is thought that the aim of the search was to disarm gangs within the prison.

The South American country's 34 prisons were designed to hold just one-third of the 50,000 inmates now in them, according to local prison advocacy groups.

In 2011, there was a month-long siege at El Rodeo prison, just outside the capital of Caracas, in which 22 people died before 5,000 soldiers were able to restore order.