SANTA MARIA, Brazil: The band was revving up, and Luciene Louzeiro was right where she wanted to be at 2:30 a.m. Sunday, in front of the stage. As hundreds of people around her in the crowded nightclub began to dance, she saw something shoot from the stage toward the ceiling: a flare.

“No one cared because they always do that, to make us dance a little harder,” said Louzeiro, 32, a saleswoman at a clothing store who went to the nightclub, Kiss, to celebrate a friend’s birthday. But when she looked up, she saw that the ceiling was on fire.

“I started screaming, and thought, ‘When it’s your time to go, it is God who decides,’?” she said.

The tragedy that unfolded next — a stampede away from a raging fire, a panicked struggle to open exit doors blocked by security guards and the deaths of more than 230 people, many of them university students, from asphyxiation and burns — has stunned a nation where the current attitude has typically been one of confidence and satisfaction after nearly a decade of robust economic activity.

There was no fire alarm, no sprinklers, no fire escape. In violation of state safety codes, fire extinguishers were not spaced every 1,500 square feet, and there was only one exit. As the city buried its young Monday, questions were raised about whether Brazil is up to the task of ensuring the safety in venues for the World Cup next year, and the Olympics in 2016. Four people were arrested for questioning, including two band members and the nightclub’s co-owner.

The description of the mayhem from survivors and statements by band members themselves, revealed a frantic struggle for survival that lasted no more than a few minutes.

Eliel de Lima, 31, the drummer in the band, Gurizada Fandangueira, told reporters that after he felt sparks fall from the ceiling, a percussionist nearby tried throwing water toward the ceiling. When that did not work, a security guard aimed an extinguisher at the blaze. The extinguisher failed to function, too, he said.

After that, panic set in on the stage and in the crowd.

“Black smoke spread quickly, then I couldn’t see a thing,” de Lima said. Still, he ran toward the exit, an effort made “500 times more difficult” by the throng of people going in the same direction. At least one member of the band, which had advertised its pyrotechnics prowess as a selling point, died in the blaze.

Those who survived did so after a group of patrons overpowered security guards, who initially kept people from fleeing out of concern that they were trying to leave without paying their tabs. By the time it became obvious that was not the case, the clubgoers inside had begun to die, largely from asphyxiation.