Media reports say the fire broke out after 2:00 local time when the nightclub was hosting a university party featuring a rock band.

"There was panic after the fire started and many revelers got trampled," Santa Maria fire Chief Guido de Melohe is quoted as saying by Estadao newspaper. "The main cause of death was asphyxiation."

According to the newspaper O Globo, sparks from the band's pyrotechnic display hit the soundproof foam on the ceiling and caught fire.

"We have just taken the fire under control," Colonel Silvia Fuchs of the local fire department was quoted by the G1 website as saying. "Now we are removing the bodies."

In the wake of the tragedy, Brazilian President Dilma Rousseff has cut short her visit to Chile in order to return home. She was participating in the European Union and the Community of Latin American and Caribbean States summit (CELAC) in Santiago.

Santa Maria, a major university city, is 300 kilometers west of the state capital, Porto Alegre.