Brazil's leftist President Dilma Rousseff narrowly won re-election on Sunday after convincing voters that her party's strong record of reducing poverty over the last 12 years was more important than a recent economic slump.
After one of the closest, most divisive campaigns in Brazil in decades, Rousseff won 51.6 percent of votes in a runoff against centrist opposition leader Aecio Neves, who won 48.4 percent with more than 99 percent of the votes tallied.
At a hotel in Brasilia where Rousseff was due to speak, party supporters waved red flags and jumped up and down, screaming in celebration.
In Sao Paulo, a stronghold of Neves' Brazilian Social Democracy Party (PSDB), a more subdued mood was punctuated by some government supporters honking horns and screaming with joy.
Voting was peaceful and Brazil's robust democracy is free of the political violence that mars some other countries in Latin America.
Yet, at a time when the economy is facing deep challenges, Ideli Salvatti, one of Rousseff's top ministers, said the government would seek to lead "a national reconciliation process given how tight the result was."
"We have to calm our hearts down first and then get back to work tomorrow," she told reporters.
The result means another four years in power for the Workers' Party, which since 2003 has virtually transformed Brazil - lifting 40 million from poverty, reducing unemployment to record lows and making big inroads against hunger in what remains one of the world's most unequal countries.
The party's star has faded recently. The economy has slowed dramatically under Rousseff's heavy-handed and often unpredictable policies, making Brazil's glory days of robust growth last decade an ever-more distant memory.
Numerous corruption scandals, high inflation and frustration over poor public services like health care tempted many to consider a switch to Neves' more pro-business agenda.
Yet Rousseff and her supporters spent the campaign warning voters, especially the poor, that a vote for the PSDB would mean a return to the less compassionate, more unequal Brazil of the 1990s - an argument that Neves rigorously denied, but ultimately prevailed anyway.
"We need Dilma to continue the programs that improve the lives of those in need," said Livia Roma, 19, a university student in Sao Paulo, as she voted on Sunday. "I didn't vote for myself, but for the minorities and less fortunate classes."