He won by a razor-thin margin over an opponent who refuses to concede. He'll take over a deeply polarized country with a troubled economy. And while some Brazilians are hopeful he can put the country back on track, others view him as a crook.

Despite engineering a stunning political comeback by winning the presidency in Sunday's runoff election over far-right incumbent Jair Bolsonaro, Luiz Inácio Lula da Silva could face a short honeymoon — and a long four years in office.

"He's going to have a very hard job rebuilding the country," said Cecilia Tornaghi, a Brazil expert and managing editor of the journal Americas Quarterly. "It's a win — but who would want this kind of victory?"

Da Silva will take it.

From prison to president-elect

Da Silva served two terms as president, from 2003 to 2010, and helped millions of Brazilians climb out of poverty, to become an icon of the Latin American left.

But in April 2018, he wound up in prison convicted in a massive corruption scandal that appeared it could end his long and storied political career.

After about a year and a half behind bars, he was released on a technicality in 2019 and the country's Supreme Court annulled his criminal conviction, finding that the judge in the case was biased.

Then da Silva launched another run for the presidency and went on to win with 50.9% of the vote compared to 49.1% for Bolsonaro — in the tightest presidential race going back at least to the end of Brazil's dictatorship 37 years ago.

"I consider myself as someone who's been resurrected," a relieved da Silva said in his victory speech.

He set out to save democracy

During his campaign, da Silva, a 77-year-old survivor of throat cancer, said a major reason for seeking his old job was to restore liberal democracy to Brazil after four years of Bolsonaro, a far-right populist in the mold of former President Donald Trump.

Bolsonaro, 67, is a former army captain who has praised the country's 1964-85 military dictatorship. He has verbally attacked the media, fomented racism, weakened government institutions, questioned the legitimacy of Brazil's electoral system, and hinted that he would stay in power even if he lost.

Indeed, Bolsonaro has yet to concede defeat and on Monday, pro-Bolsonaro truckers blocked roads in 12 of the country's 27 states to protest the official results.

However, several Bolsonaro allies, including Economy Minister Paulo Guedes and Arthur Lira, president of the lower house of Congress, have acknowledged that da Silva won. On Sunday night, Lira told a news conference: "The will of the majority, expressed at the polls, should never be challenged."

Meanwhile, the U.S. and several other governments moved quickly to recognize da Silva's victory.

São Paulo political analyst Oliver Stuenkel told NPR that Bolsonaro may opt for some dubious middle ground between acceptance and denial. To avoid legal problems, he may allow for a peaceful transition of power while refusing to formally concede. That would allow him to fuel resentment and keep his base fired up for future elections.

Either way, Javier Corrales, a political science professor at Amherst College in Massachusetts, described da Silva's triumph as vital for the health of Brazil's democracy and compared it to President Biden's defeat of Trump in the 2020 U.S. election. The results of both elections, he tweeted, represent "some of the world's most important cases of containment of democratic backsliding."

Rather than fomenting divisions like Bolsonaro, da Silva in his victory speech promised to bring Brazilians together, saying, "We are one country, one people, one great nation."

However, the U.S. often seems more polarized today than when Trump left office and the same thing could happen in Brazil once Bolsonaro leaves the presidential palace in Brasília.

"That's why people here are less euphoric than Americans were when Biden won. They are more realistic and sense that uniting Brazil may just be impossible," Stuenkel said.

In addition, Brazilian politics have grown far more conservative than when da Silva first held office between 2003-1010, with many legislature seats and state houses now occupied by Bolsonaro loyalists. Many of them consider da Silva as a criminal and an illegitimate leader and could block his efforts to increase the minimum wage, bolster anti-poverty programs and protect the Amazon rainforest.

Da Silva's known as a pragmatic dealmaker

During his campaign, da Silva promised a return to the economic good times he oversaw during his first stint as president. But that was during a commodities boom fueled by massive demand from China for Brazilian soybeans, oil and minerals. Today, growth in China is slowing while Brazil and other nations are dealing with soaring energy prices and inflation and stagnant economies.

But da Silva also possesses some unique talents.

Tornaghi of Americas Quarterly points out that the president-elect is a pragmatic former union boss and a skilled dealmaker. Referring to him by his nickname, she said: "Lula is a major-league negotiator."

And rather than promise dramatic reforms, da Silva pledged a return to normalcy after four years of erratic leadership under Bolsonaro, including his botched response to the COVID-19 pandemic that gave Brazil the world's second-highest recorded death toll from the disease after the U.S.

In the end, low expectations for his administration could end up helping da Silva.

"Since Everybody says Lula will get nothing done," Stuenkel said. "So, that provides him with some space to surprise the skeptics." [Copyright 2022 NPR]