RIO DE JANEIRO (AFP) - Brazilians narrowly voted leftist President Dilma Rousseff back into office on Sunday after a virulent election campaign that split Latin America's biggest economy between poor north and richer south.
Rousseff, Brazil's first woman president, went into the run-off contest as slight favorite and defeated center-right challenger Aecio Neves by around three million votes.
With 99 per cent of votes counted, she had won a 51.52 per cent vote share to 48.48 per cent to Neves, the business world favorite.
"Thankyou very much," Rousseff, 66, tweeted as it became clear she had won.
The race to lead the world's seventh-largest economy was seen as a referendum on 12 years of government by the Workers' Party (PT) - eight under working-class hero Luiz Inacio Lula da Silva and four under Rousseff, with voters weighing the PT's social legacy against Neves's promise of economic revival.
The bitterness of the campaign, the most vitriolic since democracy was restored in 1985 after two decades of military rule, threatens to leave the country sorely divided.
The PT endeared itself to the masses with landmark social programs that have lifted millions from poverty, increased wages and brought unemployment to a record-low 4.9 per cent.
But the outlook has darkened since Rousseff first took office in 2010, the year economic growth peaked at 7.5 per cent. She has presided over rising inflation and a recession this year, amid protests against corruption, record spending on the World Cup and poor public education, health care and transport.