At least 68 people have been killed in a fire that erupted during a riot at a jail in the Venezuelan city of Valencia, according to a government official.

The blaze at the police station’s lockup was reportedly sparked by prisoners setting mattresses alight in a jailbreak attempt on Wednesday. Many were believed to have asphyxiated due to smoke inhalation, the BBC reported.

Attorney General Tarek William Saab said on Twitter that nearly all the dead were prisoners. Two women who were staying overnight at the police station also died.

An investigation would be launched immediately to clarify what had happened, he said, adding that four prosecutors had been assigned to the case.

“The prosecutor’s office vows to investigate to immediately clarify what happened in these painful events that have left dozens of Venezuelan families in mourning,” said the Attorney General on Twitter.

Families were demanding answers and justice as it was one of the worst jail disasters to hit the nation, where human rights groups complain about bad prison conditions. A fire at a prison in the western state of Zulia killed more than 100 inmates in 1994.

The association Una Ventana a la Libertad (A Window on Freedom), which monitors jail conditions, said its reports showed a police officer had been shot in the leg by a detainee and that shortly afterwards mattresses in cells were set ablaze and the fire quickly spread.

State official Jesus Santander said one police officer had been shot. Rescuers reportedly broke through walls to try to free those trapped by the blaze.

Angry relatives gathered outside the detention centre after news of the fire broke and clashed with police as they sought information about loved ones. The situation soon turned violent and police used tear gas to disperse the crowd.

Videos showed men and women frantically running away as helmeted police wielded batons.

“They have not told us anything, I ask that (the law enforcement) not treat them like dogs, that they do not throw gas at them. They shot them as if they were dogs,” said Lissette Mendoza, a mother of a 19-year-old inmate, Yorman Salazar.

Opposition lawmaker Juan Miguel Matheus demanded that the pro-government leader of Carabobo state inform relatives about what had happened.

“The desperation of relatives should not be played with,” he said.

Later, in his press release, the Governor of Carabobo expressed his solidarity with victims’ families and said that he would support them “with the funeral services and subsequent burial of the deceased inmates”.