The Confederations Cup, held amid unprecedented social turmoil, shed light on a new face of Brazil and raised fresh questions about the country's pledge to stage the best ever World Cup next year.
Despite initial fears about delays in delivering stadia for the tournament, what was billed as a dry run for the first World Cup to be held in Brazil since 1950 proved to be a sporting success.
The Selecao captured a fourth Confederations Cup trophy by outclassing Spain, the current World Cup Champions, 3-0 in Sunday's final at Rio's iconic Maracana arena.
The organization of the event generally went well.
But the country still faces an uphill battle in completing huge infrastructure projects at a time when a restive population is venting anger over the political class's failure to deliver adequate public services and to root out endemic corruption.
The government had planned tough security measures to deal with rowdy fans, organized crime and prevent a terror attack.
But it was taken by surprise by the explosion of anger led by urban youths railing against rampant corruption and the billions of dollars invested in major football events rather than in health, education and public transport.
Brazilian authorities and world's football governing body FIFA had hoped to use the Confederations Cup to begin selling Brazil, the land of football and samba, as a joyful and successful emerging power.
Instead the world was treated to a much less idyllic image of this continent-sized country of 194 million people, with live television coverage of scenes of urban guerrilla warfare, including violent clashes between stone-throwing radicals and riot police responding with tear gas and rubber bullets.
Now there are fears, even within FIFA, that the unrest may flare anew during Pope Francis's visit to Rio late this month for a major Catholic Youth fest or even during next year's World Cup which will be followed a few months later by presidential and legislative polls.
"Of course, this situation is a source of concern. Given what has just happened, some tourists who were planning to visit Brazil might change their minds," said Marco Polo del Nero, vice president of the Brazilian Football Confederation.
Some 600,000 foreign fans are expected for the World Cup, 30 times more than during the Confederations Cup.
And organizers, who have pledged to stage the best World Cup ever, expect 3.8 million Brazilians to travel between the 12 host cities.
The country may be blessed with breathtaking natural beauty, a tropical climate, captivating samba music and football prowess but criss-crossing it is expensive and complicated.
Hotels are notorious for their exorbitant rates and poor service.
"I am sure that the World Cup will be a success. I have confidence in the organizers and in security," FIFA President Sepp Blatter said Friday.
Yet the unrest is already hurting the tourism industry. Hotels in Rio had a 27 percent cancellation rate during the Confederations Cup, according to the Brazilian Industry and Hotels Association (ABIH).
The protests, particularly those which degenerated into violence, "had a negative impact on the image of the country," said ABIH President Enrico Fermi.
"But we are not going to allow a minority to spoil the party," he told AFP.
He said there was still plenty of time for authorities to turn things around, and impress on the population all the benefits of the World Cup for tourism and the country in general.
"In 2014, security around the stadiums will be reinforced. There won't be surprises (as happened last month)," said Brazilian journalist Marcos Guterman, author of the book "Football explains Brazil".
Four of the six host stadiums for the Confederations Cup were completed well behind schedule.
For the World Cup, six others -- in the cities of Sao Paulo, Cuiaba, Porto Alegre, Curitiba, Manaus and Natal -- are to be delivered no later than December 31.
But the biggest headache is transport. Airports are for the most part aging and not equipped to handle domestic air traffic that has soared 120 percent in a decade.
Roads are in a sorry state and there is virtually no passenger train service.