Brazil's left-leaning President Dilma Rousseff was re-elected Sunday in one of the tightest races the nation has seen since its return to democracy three decades ago.
With 99 percent of the vote counted, Rousseff had 51.6 percent of vote in the run-off, topping center-right challenger Aecio Neves with 48.4 percent.
Speaking in front of a banner that read "New Government, New Ideas" and a giant photo of Rousseff from her days as a militant who fought against Brazil's long military regime, she thanked her supporters, starting with her political mentor and predecessor Luiz Inacio Lula da Silva, who picked her to take his place in 2010.
"My dears, my friends, we have arrived at the end of a campaign that intensely mobilized all the forces of this country," Rousseff said. "I thank every Brazilian, without exception."
She added that she "thanks from the bottom of my heart, our No. 1 militant, President Lula," as the former leader used a handkerchief to wipe tears from his eyes.
Rousseff sounded a conciliatory tone, saying during the live broadcast that she understood the heightened demands of Brazilians. "That's why I want to be a much better president than I have been until now," she said.
Rousseff's victory extends the rule of the Workers' Party, which has held the presidency since 2003, and gives it the chance to extend its social transformation of the globe's fifth-largest country.
During that time, economic growth has lifted 40 million people from poverty, reduced unemployment to record lows and made big inroads against hunger in what remains one of the world's most economically unequal countries.
But 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 in the last decade an ever-more distant memory.
Numerous corruption scandals, high inflation and frustration over poor public services such as health care tempted many to consider a switch to Neves' more pro-business agenda.
The re-elected leader faces an immense challenge of improving woeful public services that ignited huge anti-government protests last year, and trying to push political reforms through a highly fragmented congress where the governing coalition has less support than it did four years ago.
And, the globe's seventh-largest economy has underperformed since 2011, with some fearing it could put the social gains at risk.
"Dilma has social inclusion on her side, but the macroeconomic policies during her first four years in office have been very weak," said Carlos Pereira, a political analyst at the Gertulio Vargas Foundation, Brazil's leading think tank. "Inflation has returned, the country is in a technical recession and public spending is out of control. It is less likely she will be able to offer social inclusion and macroeconomic stability at the same time."
Rousseff and Neves fought bitterly to convince voters that they can deliver on both growth and social advances. This year's campaign is widely considered the most acrimonious since Brazil's return to democracy in 1985, a battle between the only two parties to have held the presidency since 1995.
Neves hammered at Rousseff over a widening kickback scandal at state-run oil company Petrobras, with an informant telling investigators that the Workers' Party directly benefited from the scheme.
Rousseff rejected the allegations and told Brazilians especially the poor, that a vote for the Neves and the PSDB would mean a return to the less compassionate, more unequal Brazil of the 1990s — an argument that Neves rigorously denied, but ultimately appears to have 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 Sunday. "I didn't vote for myself, but for the minorities and less fortunate classes."
Investors have generally disliked Rousseff's interventionist management of state-run companies and other sectors of the economy, and Brazil's financial markets plummeted last week when polls showed she was likely to win a second term. They could see another selloff Monday.
With 200 million people and a gross domestic product of some $2 trillion, Brazil is Latin America's largest economy and its most populous country.
By re-electing Rousseff, Brazil will remain on a middle ground between more socialist governments in Venezuela and Argentina, and the freer-trading, faster-growing countries that include Colombia and Chile.
Rousseff owed her victory to overwhelming support from the roughly 40 percent of Brazilians who live in households earning less than $700 a month.
They have benefited from the Workers' Party's rollout of a program that pays a small monthly stipend to one in four Brazilian families, as well as federal housing programs, government-sponsored vocational schools and an expansion of credit to the working class.
In Brazil's biggest city of Sao Paulo, thousands of Workers' Party supporters gathered on a main avenue Sunday night, waving banners as a truck with giant speakers blasted Rousseff's campaign jingles.
"I'm very happy because I think the construction of Brazil has barely begun and now we will have continuity," said Liliane Viana, a 56-year-old retired federal government worker. "I was afraid we were going to move backward. Now I am extremely excited."
But Rousseff, 66, is unlikely to enjoy much, if any, of a honeymoon when her second term starts on New Year's Day.
Recent allegations of systemic corruption at state-run oil giant Petrobras roiled the final days of the campaign and are likely to be a major political headache in coming months and years as prosecutors pursue those responsible.
The economy slipped into a recession earlier this year, and ratings agencies have warned that a credit downgrade is possible unless Rousseff makes hefty spending cuts to correct deficits that have mushroomed in recent months.
Her aides have said she will try to win back the confidence of financial markets by announcing a more pragmatic finance minister for her second term, although many investors worry that Rousseff will continue to call most of the shots herself.