At least 37 people in a southern Venezuela prison died Tuesday night after a massive fight broke out between inmates and security officials, a governor in the South American country said.

The violence started around midnight on Tuesday at the prison in Puerto Ayacucho, according to Gov. Liborio Guarulla of Amazonas state.

Guarulla said security forces entered the grounds in an attempt to restore order in the prison, where the inmates had seized control several weeks ago.

"At midnight special forces showed up and through the night we heard gunfire and explosions," Guaralla said.

The governor referred to the fighting as a "massacre" on Twitter. The bloodshed was believed to be the worst in Venezuela since a prison riot in 2013 that left 61 people dead.

The office of Venezuela's chief prosecutor said on social media that 14 prison guards were injured in the fight, and that it was investigating the incident.

Venezuela has around 30 prisons, many of which suffer from overcrowding and are dominated by criminal gangs that traffic in weapons and narcotics.

The prison system, built to hold about 16,000 inmates, is currently estimated to house some 50,000 prisoners, according to the Venezuelan Prisons Observatory, which monitors prison conditions.

But Guarulla said the facility in Puerto Ayacucho housed only about 110 inmates, all of them awaiting trial, and unlikely suffered from the same volatile conditions seen elsewhere in the country's prisons.

The Associated Press contributed to this report.