Brazil's Carnival celebrations have cut loose, but the parades, block parties and overall festivities began under the pall of a recent nightclub fire that killed 238 people in the southern city of Santa Maria.

Even as the mayor of Rio de Janeiro handed over the keys of the city to King Momo, the ceremonial figurehead of Brazil's best-known Carnival celebrations, the mourning continued.

President Dilma Rousseff attended a mass in honour of the fire victims at the cathedral in Brasilia, the capital, on Thursday night.

She will spend the five-day holiday in the northeastern state of Bahia, where a blackout late Thursday darkened the capital city of Salvador ahead of the revelry there. Her press office said she would not participate in any of them.

Most of the show, of course, will go on.

Psy, the Korean pop star whose Gangnam Style single with its signature dance moves has made him a global phenomenon, was scheduled to sing in the massive street parties in Salvador, Brazil's third-biggest city. Other Brazilian and foreign celebrities, including American actress Megan Fox, were expected to enliven celebrations in Rio and elsewhere.

Carnival is the consummate Brazilian holiday, with most of Latin America's biggest country closed down ahead of the Catholic season of Lent.

The annual event lures millions of locals and tourists to parties across the country. Rio alone is expected to attract 900,000 tourists and generate US$665 million for the local economy this year.

SWINGS OF EMOTION, SHUTTERED CLUBS

But with 65 survivors from the fire still hospitalised, national media and private conversations were full of sombre reflection. Dozens of cities, most of them near where the January 27 nightclub disaster occurred, cancelled or toned down some of the festivities.

Hundreds of nightclubs and other venues remain shuttered after municipal authorities nationwide moved to crack down on lax enforcement of safety codes, one of several factors that investigators say led to the tragedy in Santa Maria.

Gaudencio Torquato, a columnist writing in the Estado de S Paulo newspaper, this week compared Brazil to a "see-saw," a country where emotional "highs and lows relieve each other without interruption."

It's hardly the first time Carnival has been affected by troubling circumstances.

Last year, celebrations in Salvador were dampened by a police strike that days before led to a crime spree resulting in at least 150 murders. Police in Rio briefly struck as well until authorities negotiated a pay increase.

This year, dozens of arson attacks have rattled the state of Santa Catarina, also in Brazil's south. Police believe the attacks, which so far have not caused any injuries or deaths, are the work of criminal gangs protesting prison conditions.

Thursday night's power outage in Salvador, caused by short circuits after reelers threw Carnival tinsel on power lines, followed several big blackouts that have dimmed parts of Brazil in recent months.

The electricity problems, coupled with longstanding complaints over the poor state of roads, ports and airports, have led to growing concerns about Brazil's ability to host the World Cup of soccer next year and the 2016 Olympics in Rio.