CARACAS, Venezuela (AP) _ Flames consumed a cell in an overcrowded downtown prison, killing at least 26 inmates. It was unclear whether guards or prisoners started the fire.

Director of prisons Antonio Marval said several guards had thrown tear gas canisters into the cell, sparking the blaze, but he gave no specifics. Three guards were detained for interrogation.

Yet, an attorney from the Attorney General's office speaking on condition of anonymity said prisoners told him inmates had set fire to mattresses.

Most of the 26 charred and crumpled bodies were stacked in the 12-by-12 cell, whose walls were fire-blackened. Other than the bodies, only the burnt metal frames of two bunk beds were left.

``There are burned bodies one on top of each other,'' Marval told reporters outside La Planta jail in El Paraiso neighborhood.

Marval earlier said the guards had used tear gas to put down a riot in a cellblock housing dozens of inmates. Prisoners, however, denied they rioted, according to Martin Pacheco, a national congressman and Radio Capital journalist who was allowed to enter the jail and speak with prisoners Tuesday morning.

Several hundred inmates, some armed with homemade knives, gathered at a fence and demanded that reporters and public prosecutors enter the burned cellblock ahead of the National Guard so they could give their version of the events, Pacheco said.

By mid-morning, the National Guard was in control of the rest of the prison, and by late afternoon officials removed the bodies from the cell after inmates initially blocked their access.

Though the details of what transpired at La Planta were sketchy, Marval, who visited the scene and interviewed inmates and prison officials, acknowledged the guard abuses.

``There were excesses by three guards ... who savagely attacked the prisoners,'' he told reporters outside the jail. ``The guards are clearly identified,'' and were detained by authorities for interrogation.

Also speaking at the jail, Justice Minister Henrique Meier added: ``This is a crime against Venezuela and against humanity. This cannot remain unpunished.''

The incident was the deadliest at a Venezuela jail since a January 1994 riot and fire at Sabaneta Prison in Maracaibo in which 108 inmates died.

Most Venezuela jails are run down and severely overcrowded, and supervision is minimal. La Planta's 25 guards are in charge of 1,700 inmates _ it was built for 1,000 inmates _ Marval said.

Most inmates are awaiting trial and yet to be convicted of any crime. Hardened criminals are locked up along with inmates accused of non-violent crimes.