A nightclub fire in Brazil killed 233 people early on Sunday as people attempting to escape out of control stage fireworks led to overcrowding at the club's only exit and resulted in a pile of dead bodies that prevented people from fleeing and firefighters from entering.

The fire spread within seconds after a band member pointed a lit flare upwards, trigerring an initally small fire in the ceiling, Reuters reported citing a civil police official.

"The band that was onstage began to use flares and, suddenly, they stopped the show and pointed them upward," a witness, Michele Pereira, told the Folha de S. Paulo newspaper. "At that point, the ceiling caught fire. It was really weak, but in a matter of seconds it spread."

Brazil's President Dilma Rousseff referred to the incident as a "tragedy" and interrupted an official visit to Chile to return to Brazil.

"All I can say at the moment is that my feelings are of deep sorrow," she told media.

The band has been identified as Gurizada Fandangueira. Guitarist Rodrigo Martins told Radio Gaucha that the band "had played around five songs when I looked up and noticed the roof was burning."

"It might have happened because of the Sputnik, the machine we use to create a luminous effect with sparks. It's harmless, we never had any trouble with it," he said.

"When the fire started, a guard passed us a fire extinguisher, the singer tried to use it but it wasn't working," he added.

A video of the tragedy showed shirtless men outside the Boate Kiss as the nightclub burnt.

According to reports, most of the victims were university students and as many as 95 percent died of smoke inhalation, officials said.

Others were crushed in the stampede.

"We ran into a barrier of the dead at the exit," Colonel Guido Pedroso de Melo, commander of the fire brigade in Rio Grande do Sul, said of the scene that firefighters found on arrival. "We had to clear a path to get to the rest of those that were inside."

Officials said more than 1,000 people may have been in the club, possibly exceeding its legal capacity. Though Internet postings about the venue suggested as many as 2,000 people at times have crammed into the club, Pedroso de Melo said no more than half that should have been inside.

He said the club was authorized to be open but its permit was in the process of being renewed.

However Pedroso de Melo did point to several egregious safety violations - from the flare that went off during the show to the locked door that kept people from leaving.

'HAPPENED SO FAST'

When the fire began at about 2:30 a.m., many revelers were unable to find their way out amid the chaos, confusing restroom doors for exits and finding resistance from bouncers when they did find an exit.

"It all happened so fast," survivor Taynne Vendrusculo told GloboNews TV. "Both the panic and the fire spread rapidly, in seconds."

Once security guards realized the building was on fire, they tried in vain to control the blaze with a fire extinguisher, according to a televised interview with one of the guards, Rodrigo Moura. He said patrons were getting trampled as they rushed for the doors, describing it as "a horror film."

One of the club's owners has surrendered to police for questioning, GloboNews reported.

TV footage showed people sobbing outside the club before dawn, while shirtless firefighters used sledge hammers and axes to knock down an exterior wall to open up an exit.

Rescue officials moved the bodies to the local gym and separated them by gender. Male victims were easier to identify because most had identification on them, unlike the women, whose purses were left scattered in the devastated nightclub.

The disaster recalls other incidents including a 2003 fire at a nightclub in West Warwick, Rhode Island, that killed 100 people, and a Buenos Aires nightclub blaze in 2004 that killed nearly 200. In both incidents, a band or members of the audience ignited fires that set the establishments ablaze.

The Rhode Island fire shocked local and federal officials because of the rarity of such incidents in the United States, where enforcement of safety codes is considered to be relatively strict. After the Buenos Aires blaze, Argentine officials closed many nightclubs and other venues and ultimately forced the city's mayor from office because of poor oversight of municipal codes.

The fire early on Sunday occurred in one of the wealthiest, most industrious and culturally distinct regions of Brazil. Santa Maria is about 186 miles west of Porto Alegre, the capital of a state settled by Germans and other immigrants from northern Europe.

Local clichés paint the region as stricter and more squared away than the rest of Brazil, where most residents are a mix descended from native tribes, Portuguese colonists, African slaves, and later influxes of immigrants from southern Europe.

Rio Grande do Sul state's health secretary, Ciro Simoni, said emergency medical supplies from all over the state were being sent to the scene. States from all over Brazil offered support, and sympathy messages poured in from foreign leaders.

(Reuters contributed to this report.)