At least six people died in connection with the protests.
"There will be no World Cup," became one of the mass movement's most popular chants. "FIFA go home." was another.
The protests have continued, growing less frequent but more violent, and authorities must prepare even if the threats never materialize.
Jerome Valcke, the top FIFA official in charge of the World Cup, said recently the football tournament would have "the highest level of security you can imagine" to contain any violence.
Efforts are underway to improve the image of Brazil's military police, whose troops can look menacing patrolling the streets in light armor. They have been given new uniforms, including stylish berets, and lessons in managing social disturbances, and many are visible at high-profile places such as Cobacabana beach.
The French were in Brazil last month, and the influence is clear.
"Brazil has experience since they deal with security issues mainly in the favelas (slums), but the way you work in the favelas is different to the way you work in large events," said Capt. Jean-Louis Sanche, a member of France's elite CRS police force. "There's a difference in the way you use your resources. We are here to pass on this know-how."
Brazilian military policeman Marcos Palermo soaked up the training.
"Absolutely this will be used during the World Cup, which promises big protests. We are preparing ourselves early on," Palermo said.
Few would have imagined that a World Cup in Brazil, the sport's spiritual homeland and most famous name, might cause problems.
This World Cup opening June 12 in Sao Paulo and closing July 13 in Rio might go down as the best in history, and Brazil could showcase its friendly people, hospitality and love of a good party. A successful World Cup could pave the way for the 2016 Rio Olympics, which will cost about $15 billion in public and private money.
A victory might also help President Dilma Rousseff, who is up for re-election shortly after the Cup ends.
Brazil will be among the four favorites along with Germany, defending champion Spain and Lionel Messi's Argentina. The other four seeded teams are Belgium, Switzerland, Uruguay and Colombia. Perennial contenders such as Italy, France and the Netherlands are also in the mix.
If Brazil fails to win its sixth World Cup, all bets are off.
"I have a fear that if Brazil does not win the World Cup, people will be very disappointed and all these expenses generated with the World Cup will be questioned," said Felipe Miranda, a telecommunication engineer in Rio. "Following the same line, winning the World Cup may be the only way to keep people calm. They will think it was expensive, but worth it."
There are worries in three other areas.
STADIUMS: At least three World Cup stadiums will not be finished by the end of December as FIFA requested. FIFA said Tuesday the stadiums in Sao Paulo, Curitiba and Cuiaba would miss the deadline because of construction delays.
FIFA said the stadiums in Cuiaba and Curitiba would be ready by the end of February. It is unclear when the stadium in Sao Paulo will be done. Two workers died there last week in a construction accident, which also damaged the stadium. FIFA said it was confident it would be ready for the opening match.
Brazil is using 12 new or refurbished stadiums FIFA required only eight as a cost of about $3.5 billion. The cost has risen by about $430 million in the last year, according to government figures, due to delays and cost overruns. The original estimate was about $2.2 billion.
Four of the 12 stadiums are seen as "white elephants:" Manaus, Cuiaba, Natal and Brasilia. A judge in the state of Amazonia suggested the Manaus stadium be used afterward for prisoner processing.
TRANSPORTATION: Brazil has decided against opening more routes for foreign air carriers for the World Cup, certain it can handle the crunch.
In an interview with The Associated Press, Civil Aviation Secretary Wellington Moreira Franco said the idea of expanding routes for foreign carriers "was never considered." Moreira Franco said that Brazilian carriers can handle the load with 600,000 foreigners and more than 3 million Brazilians expected to head to matches.
Moreira Franco's statement contrasts with that of Flavio Dino, president of the state-run Brazilian tourism agency Embratur, who said in a recent interview that the government was considering more foreign carriers.
Some fear Brazil could be stretched, its creaking airports already strained. The continent-size country has limited rail service, the road network is underdeveloped and overtaxed, and flying will be the only alternative for most people traveling to the 12 host cities.
HOTELS: Embratur, the state-run tourism agency, has said rates may increase up to 500 percent during the World Cup in some hotels offered by the FIFA-appointed agency MATCH Services. The Brazilian justice ministry has asked hotels to explain, and Brazil President Dilma Rousseff has created a committee to monitor hotel price rates and increases.
The government may have little clout because hotels are free to set prices. Local newspaper reported this month that hostels in some host cities were charging $435 per night, per person, for a room with a shared bath.
Online travel services show prices for some mid-range hotels in Rio topping $1,500 a night during the World Cup.
__
Associated Press writer Jenny Barchfield in Rio de Janeiro contributed to this report.
___
Follow Stephen Wade at http://twitter.com/StephenWadeAP