By Alexandre Caverni and Anthony Boadle
SAO PAULO/BRASILIA (Reuters) - The script was simple enough: host the soccer World Cup, win it for a record sixth time and ride a wave of national euphoria to another four years in power.
Yet Brazil's ruling Workers' Party may find it's not that easy.
Recent history shows little correlation between being crowned world soccer champions and winning elections, despite endless speculation to the contrary among Brazilians of all political stripes.
At best, President Dilma Rousseff could get a temporary bump from a victory for the heavily-fancied home team in July but it would likely wear off in a few weeks, leaving more than two months for reality to set back in before election day on October 5.
At worst, a disastrous early exit from the tournament could add to frustrations with the way Brazil is run and fuel a growing desire for change.
With no home team to root for, more Brazilians might feel tempted to join anti-World Cup street protests, creating a potentially volatile situation for Rousseff to manage.
Indeed, what was supposed to be a moment of national pride has instead become a political minefield for a president whose popularity is already waning.
A string of violent protests last year during a smaller soccer tournament here drew hundreds of thousands onto the streets and dramatically raised the political stakes at the World Cup, which starts on June 12 in Sao Paulo.
One of Rousseff's main challengers, Eduardo Campos, recently told Reuters that the Cup could have some effect on opinion polls right after it ends, "but other concerns will soon appear on the radar."
Political science seems to back that up. Sporting victories 10 days before an election can win an additional 1 to 2 percent of the vote for an incumbent, but games played more than two weeks prior have little effect, a study in 2010 by Stanford Graduate School of Business researchers found.
That, for the most part, has been the case in Brazil.
Since 1994, the World Cup has coincided every four years with general elections in Brazil.
That year, Brazil won the tournament just as an economic stabilization plan, which included the launch of a new currency, the real, was being rolled out.
The man who conceived the plan, Fernando Henrique Cardoso, later said the upbeat national mood following the victory may have helped the currency succeed - which, in turn, led to Cardoso's election to the presidency later that year.
After that, though, the correlation falls apart.
In 1998, Cardoso was re-elected even though Brazil lost in the World Cup final to France. Four years later, Brazil beat Germany to become champions for a fifth time, yet opposition leader Luiz Inacio Lula da Silva beat Cardoso's candidate at the polls.
Lula was easily re-elected in 2006, when Brazil was knocked out in the quarter-finals by France. And Rousseff cruised to victory in 2010 with Lula's blessing, just a few months after the Netherlands eliminated Brazil in South Africa.
HOME FIELD RISKS
The big difference this time is that the World Cup is being held at home and there is far more at stake than the performance of Brazilian soccer stars like Neymar.
And a lot can go wrong off the pitch.
Deficient transport could stop teams and fans getting to games on time. Stadiums built in a hurry could be faulty. Wireless communications could jam or floodlights could cut out in the middle of play.
Worse, games could be disrupted by street protests by Brazilians who say the government should have built hospitals, schools and rapid transit systems instead of costly soccer stadiums that some host cities do not even need.
With billions watching on TV around the globe, any mishap would embarrass Brazilians who hoped the World Cup would cap Brazil's emergence as a player on the global stage. And they could take it out on the president.
"Whatever happens, whether it's a blackout during a game, traffic jams, clogged airports or an accident involving poorly built infrastructure, she will be blamed directly," said Thiago de Aragão, a partner at Arko Advice consultancy in Brasilia.
"President Rousseff must be wishing Brazil did not have to host the World Cup in an election year," he said.
To be sure, many predict Brazil will win the World Cup on home soil, and Rousseff is still favored to get re-elected. But her numbers are dropping in opinion polls, which also show that a majority of Brazilians now oppose hosting the Cup.
Early defeat is the biggest danger for Rousseff, said Senator Romero Jucá of the PMDB party, who sees an inverse correlation between Brazil's performance and the protests: the better Brazil does the smaller the demonstrations will be.
"She had better hope Neymar plays well and Brazil wins."
(Editing by Kieran Murray)