Simon Romero / New York Times News Service

RIO DE JANEIRO — A fire ignited by a flare from a live band’s pyrotechnic spectacle swept through a nightclub filled with hundreds of university students early Sunday morning in Santa Maria, a city in southern Brazil, killing at least 232 people, officials said.

Health workers hauled bodies from the club, called Kiss, to hospitals in Santa Maria throughout Sunday morning. Some of the survivors were taken to the nearby city of Porto Alegre to be treated for burns. Valdeci Oliveira, a local legislator, told reporters that he saw piles of bodies in the nightclub’s bathrooms.

Survivors described a frenzied and violent rush for the main exit. Murilo de Toledo Tiecher, 26, a medical student at the University of Caxias do Sul who was at the club, said he and his friends had to push through a crush of people to get around a metal barrier that was preventing the crowd from spilling out into the street. He said some people became trapped after they rushed into the bathroom near the exit, thinking it was a way out. Once he was outside, he said, he tried to pull others to safety.

“If we saw a hand or a head, we’d start pulling the person out by the hair,” he said in a telephone interview. “People were burned; some didn’t even have clothes.”

The disaster ranks among the deadliest of nightclub fires, comparable to the 2003 blaze in Rhode Island that killed 100 people, one in 2004 in Buenos Aires in which 194 were killed, and a fire at a club in China in 2000 in which 309 people died.

The disaster in Santa Maria, which is in the relatively prosperous state of Rio Grande do Sul, shocked the country. President Dilma Rousseff canceled appointments at a summit meeting in Chile to travel to Santa Maria, a city of about 260,000 residents that is known for its cluster of universities.

The circumstances surrounding the blaze, including the use of pyrotechnics and the reports of a blocked exit, are expected to raise questions as to whether the club’s owners had been negligent. While it is not clear why patrons were initially not allowed to escape, it is common across Brazil for nightclubs and bars to have customers pay their entire tab upon leaving, instead of on a per-drink basis.

More broadly, the blaze may focus attention on issues of accountability in Brazil and point to the relaxed enforcement of measures aimed at protecting citizens, even with an economy on solid footing.

The nation’s civil service has grown significantly over the past decade, tax revenues are soaring and there is no shortage of laws and regulations governing the minutiae of companies large and small. Yet preventable disasters still commonly claim lives in Brazil, as illustrated by Rio de Janeiro’s building collapses, manhole explosions and trolley mishaps.

“Bureaucracy and corruption also cause tragedies,” said Andre Barcinski, a columnist for Folha de Sao Paulo, one of Brazil’s largest newspapers.

Some of the survivors’ criticisms offered a sense of the broader argument over who was responsible. “Only after a multitude pushed down the security guards did they see” what they had done, Tiecher said in comments posted on Facebook.

In an interview, he said that security guards had blocked the club door and initially prevented people from escaping because they thought a fight had broken out inside, and that customers would use the opportunity to leave without paying their bar tabs.