Rioting and a fire at a police station in the Venezuelan city of Valencia, in Carabobo State, have left 68 people dead, government officials say.
Chief State Prosecutor Tarek Saab said an investigation into what had happened would begin immediately.
The blaze reportedly started after prisoners set fire to mattresses in an attempt to break out on Wednesday.
Police used tear gas to disperse relatives who surrounded the station after news of the fire broke.
State official Jesus Santander confirmed a police officer had been shot in the aftermath of the blaze, which has been brought under control.
He said the state of Carabobo was in mourning after the incident.
A tragedy never far away?
By Will Grant, BBC News Latin America Correspondent
Even by Venezuela's prison standards, where conditions are among the worst in the world, this was a huge fire with devastating consequences.
Families, desperate for news, gathered outside the facility in Valencia, only to be repelled by police who fired tear gas on the crowd.
Inside, scores of inmates had been killed, many from smoke inhalation.
At this stage, the official version suggests the fire was started deliberately, as a riot took hold.
The government of President Nicolas Maduro has said a full investigation will begin immediately. However, for the loved ones outside, it is a time of grief and anguish.
Very few clear explanations from the authorities have been given and figures as to the number of dead continue to rise.
There have been several serious fires and riots in Venezuelan jails over the past decade. However, human rights NGOs say, given the severe overcrowding and inhumane conditions in the South American nation's prison system, a tragedy of this magnitude was never far away.
Some women and children who were visiting inmates are thought to be among the dead.
Venezuela's prisons are notoriously overcrowded, with violence and deadly riots are common.
The country has struggled to accommodate its prisoners amidst an ongoing economic crisis, leading to the use of temporary facilities such as the one in Valencia.
Carlos Nieto, head of the association Una Ventana a la Libertad (A Window on Freedom), says some police facilities are overfilled at five times their capacity.
Last month inmates at a different prison in Carabobo took a number of prisoners and guards hostage in another riot.