RIO DE JANEIRO (AFP) - The economy is crumbling, public coffers are empty and street protests are turning violent. What's Rio de Janeiro going to do?
Carnival starts Friday (Feb 24) and it couldn't come soon enough for a city reeling from a cocktail of crises that make the glory days of hosting South America's first Olympic Games six months ago feel light-years away.
The annual bash - which attracts an estimated one million tourists - kicks off officially with the handing over of the symbolic city keys to Rei Momo, the carnival king.
Already the country was shutting down: streets were beginning to empty, most businesses prepared to close until next Thursday, and even the usually raucous chamber of Congress in the capital Brasilia was deserted.
Cariocas, as Rio residents are called, have been partying hard in informal street "blocos" for several weeks, but now the serious fun begins with rival samba parades in the Sambodromo stadium.
The first parades start Friday, warming up for the elite "special group" samba schools like Mangueira and Beija Flor who compete all through Sunday and Monday nights.
Watched by 70,000 people in the Sambodromo, the parades are intense, heart-pounding affairs where as many as 3,000 performers at a time dance and sing in outrageously over-the-top costumes.
Their goal will be winning the coveted top prize awarded on Ash Wednesday - the start of Lent in this mostly Catholic country.
The pomp comes against a grim background of recession and crime.
At least 37 cities are reported by Folha de S.Paulo newspaper to have cancelled their carnivals for lack of funds or security.
In much of Espiritu Santo state, which borders Rio de Janeiro, carnival has been scratched, Brazilian media report, because of a bloody episode this month when police went on strike and 140 murders were committed in the space of a week.
Rio, home to the country's and arguably the world's most important carnival, has also been on edge.
Violent confrontations have taken place since the start of the year between riot police and protesters against austerity measures meant to rescue the nearly bankrupt state.
Earlier this month relatives of street cops tried to blockade stations in protest of late payment of salaries - raising fears that law and order would weaken further in a city buffeted by rising crime. Detectives are already on strike over late salaries.
In the run-up to the carnival, some 9,000 soldiers and marines were deployed in Rio streets, the camouflaged, rifle-toting men standing out amid the bathers of Copacabana and other popular sites.
Despite the state governor's plea for the troops to stay, they were ordered to withdraw as of Wednesday.
Given the tension in Brazil, it's no surprise that politics is not far from the partying.
Rio carnival goers were surprised to learn that their newly elected mayor, who is also an evangelist bishop, is not expected to attend.
He has already confirmed that he will break with tradition and not personally hand the keys to Rei Momo, apparently out of distaste for the wild excesses of the city's favorite public event.
The parades themselves have an unusually political slant this year.
One samba school will recreate an embezzlement scandal under France's King Louis XIV - a theme with distinctly current overtones in corruption-riddled Brazil.
Another school's parade will depict deforestation and destruction of indigenous lands, infuriating the country's powerful agribusiness lobby.
Yet even with all this rancor, the city is primed for fun.
"The carnival looks like a party and it is one, but it's much more than that," said writer Gregorio Duvivier, a prominent carnival participant.
"It often serves to help us put aside our problems for a few days.... I think that it's even greater in time of crisis, because it's even more needed."