Luiz Inacio Lula da Silva holds a Brazilian flag while leaving a polling station in Sao Paolo during Sunday's presidential runoff election.
Caption

Luiz Inacio Lula da Silva holds a Brazilian flag while leaving a polling station in Sao Paolo during Sunday's presidential runoff election. / AFP via Getty Images

Updated October 30, 2022 at 11:04 PM ET

In just three years, Luiz Inácio Lula da Silva has gone from prisoner to president-elect.

After being jailed on corruption charges, the left-wing da Silva engineered a stunning political resurrection on Sunday by winning Brazil's presidential runoff election — in a nail-biter — over right-wing incumbent President Jair Bolsonaro.

Official returns gave da Silva, who is a former two-term president, 50.9% of the vote compared to 49.1% for Bolsonaro. Da Silva will be sworn-in for a four-year term on Jan. 1.

"I'm really happy," said Victor Costelo, 33, who works in advertising, as he celebrated on the streets of Sao Paulo that were crowded with da Silva supporters, many of them wearing the red colors of his Workers Party. After four years of Bolsonaro, who Costelo described as an authoritarian, he said, "the next four years will be more hopeful for us."

The extremely tight race showed how politically polarized Brazil has become in recent years. Although the balloting was largely peaceful, there were several violent incidents during the campaign with authorities reporting the killings of at least four da Silva supporters at the hands of pro-Bolsonaro fanatics.

Bolsonaro, 67, a populist in the mold of former U.S. President Donald Trump, served as an army captain during Brazil's military dictatorship that lasted from 1964-85 and filled his cabinet with former officers. He repeatedly challenged the legitimacy of the election and the reliability of Brazil's electronic voting machines and hinted that he might not accept the results if he lost.

His anti-democratic rhetoric alarmed many Brazilians, while 77-year-old da Silva promised a return to normality.

"We are going to fix the country and you are going to be happy again," he told voters in the run-up to Sunday's balloting.

Da Silva and Bolsonaro were the two top finishers in a first round of presidential voting on Oct. 2 that featured 11 candidates. But neither da Silva nor Bolsonaro secured more than half the votes required for an outright victory, forcing this weekend's runoff election.

Da Silva has promised to increase the minimum wage and jump-start the economy, which has been flagging since the COVID-19 pandemic hit Brazil and caused nearly 700,000 deaths – the world's second-highest death toll after the U.S. He has also pledged to protect the Amazon rainforest after deforestation hit a 15-year high under Bolsonaro.

Sunday's victory was perhaps the most spectacular in da Silva's roller-coaster political career.

After three failed runs for the presidency, da Silva was elected to the post in 2002 then reelected in 2006. As president, he oversaw an economic boom that helped lift millions out of poverty, making him an icon of the Latin American left.

However, after leaving office, Lula became ensnared in a wide-ranging bribery scandal that landed him in prison for 580 days. His political career appeared to be over. But he was released on a technicality in 2019 and launched yet another run for the presidency that quickly garnered enthusiastic support.

His victory will help consolidate a leftward shift in Latin America where, from Mexico to Argentina, the biggest countries are run by leftist presidents.

World leaders were quick to congratulate da Silva on his victory.

"I send my congratulations to Luiz Inácio Lula da Silva on his election to be the next president of Brazil following free, fair, and credible elections," President Biden said in a statement. "I look forward to working together to continue the cooperation between our two countries in the months and years ahead."

Canadian Prime Minister Justin Trudeau said in a tweet that he anticipated working with the leader on mutual priorities, like protecting the environment.

"The people of Brazil have spoken," Trudeau said.

There was no immediate comment from Bolsonaro. But two of his close political allies, finance minister Paulo Guedes and Arthur Lira, president of the lower house of Congress, seemed to acknowledge that Bolsonaro had lost.

Guedes tweeted "Thank you for everything, Jair Bolsonaro." Lira told reporters that it was time for pro-Bolsonaro forces to reach out to the other side, adding "long live democracy in Brazil."

Da Silva, speaking at a victory rally in São Paulo, acknowledged the divided nature of the electorate and called for national unity. But he couldn't resist crowing about his ability to come back from a political near-death, saying of his adversaries: "They tried to bury me alive, but I'm here. ... Today, we are saying to the world that Brazil is back."

Copyright 2022 NPR. To see more, visit https://www.npr.org.