By Brad Haynes
SAO PAULO, July 2 (Reuters) - Over the past year it seemed every blackout, traffic jam or cancelled flight in Brazil was met with the same refrain: "Just imagine during the World Cup."
The doomsayers could not have imagined how well the tournament would go. The first three weeks of the World Cup have been as remarkable for the mostly smooth logistics and carefree atmosphere as for the thrilling play on the pitch.
After months of hand wringing over unfinished public works, violent protests and costly stadiums delivered at the last minute, impressions of the host country have swung 180 degrees.
"Sensational World Cup," tweeted British journalist Faisal Islam. "They should hold it in Brazil every time."
There are eight games to play, of course, so a high-profile debacle in the final stages could still sour the mood.
And many Brazilians are still angry about the $11 billion of public spending on an event that will likely leave at least four stadiums as white elephants and few of the urban transit projects that were promised.
But the tournament itself, which culminates in a final match on July 13, has been a rollicking success by most accounts.
Despite widespread frustration with the hefty price tag, Brazilians have received soccer's biggest show with their famous enthusiasm, packing stadiums and embracing the flood of foreign fans.
The teams have also obliged with balanced, high-scoring matches and some dramatic finishes.
"I think it is the best World Cup in terms of the soccer," FIFA general secretary Jerome Valcke said on Tuesday.
"We had some small problems off the soccer fields, nothing major. We saw some things that were unfinished, but in the final analysis expectations were surpassed," added Valcke, who was one of the most vocal critics of the delayed preparations for the tournament.
When obvious flaws appeared, organizers reacted quickly. An invasion of Rio's Maracana stadium by 90 Chilean fans without tickets led to a wider perimeter. Security was also reinforced after clashes between rowdy Argentina and Brazil fans.
The greatest relief for organizers is the lack of angry Brazilians in the streets. Last year, protests against government spending on the World Cup and other issues drew more than one million people but they have petered out in recent months.
Smaller protests in the first days of the tournament were met with tear gas, rubber bullets and overwhelming force from police. Given the choice between violent marches in the streets and watching world-class soccer, most Brazilians have been glued to their televisions.
Soccer-mad Brazil always goes quiet during the World Cup, and the effect in the cities hosting matches this year has been even more pronounced. Municipal holidays on game days have reduced traffic and eased access to the stadiums.
Business travel has also fallen off sharply, reducing Brazil's air traffic by as much as 15 percent during the World Cup and reducing the load on its outdated airports.
"We are scoring lots of goals against the pessimists who said it would be chaos," said President Dilma Rousseff this week, celebrating a smooth tournament that could boost her chances of re-election in October.
The pattern of mounting dread giving way to jubilant relief has become a familiar one at global sporting events.
Earlier this year, the Winter Olympics in Sochi were widely portrayed as a disaster waiting to happen, dogged by security concerns, allegations of corruption and massive cost overruns.
The criticism gathered pace when then the first wave of journalists arrived to find unfinished hotels and huge packs of stray dogs, yet the Games went ahead smoothly and were eventually hailed as a success.
At the last Summer Olympics, in London in 2012, years of negativity gave way to a new era of hope and glory in the British capital.
Just days before the opening ceremony, construction workers were still scrambling with preparations and an embarrassing last-minute security blunder forced the government to deploy thousands of extra troops to protect the Games. Yet like Sochi, the Games were ultimately hailed as a hit.
The build-up to the 2010 World Cup in South Africa was also wracked by dire predictions of poor organization and violent crime but ended successfully after a tournament played in modern stadiums backed by huge enthusiasm in the stands.
Brazilian crowds are also in an exuberant mood, cheering on underdogs and celebrating along with Latin American rivals - as long as they haven't crossed the local team.
"The party has surprised everyone. The fear is over. Everyone is loving it," said Rogerio Souza, a Brazilian fan relishing his fourth World Cup and his first on his home turf. "All we need is for Brazil to win to give us a storybook ending." (Additional reporting by Julian Linden and Mike Collett; Editing by Todd Benson and Kieran Murray)