"At midnight special forces showed up and through the night we heard gunfire and explosions," Guarulla told The Associated Press.
The office of Venezuela's chief prosecutor said on social media that it was investigating the incident. It said 14 prison guards were also injured.
Guarulla said the city's morgue had been overwhelmed trying to handle so many bodies.
Venezuela has around 30 prisons, many of which suffer from overcrowding and are dominated by criminal gangs that traffic in weapons and narcotics as well as plot crimes taking beyond prison walls. 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 death toll was the worst in Venezuela since a prison riot in 2013 that left 61 people dead.
Venezuela is one of the world's most-violent countries.
More about: #Venezuela