Brazil will go to the polls Sunday to choose a new president, in what could be the most important election in its history

What’s the story and what is at stake?

Latin America’s largest democracy will go to the polls on Sunday to choose a new president, 27 state governors, 54 senators and nearly 1,600 lawmakers, in what some consider the most important election in Brazilian history.

Leading the race to become Brazil’s next commander-in-chief is a pro-torture, far-right dictatorship-admiring former paratrooper called Jair Bolsonaro who currently enjoys about 32% in the polls.

Behind him, with about 22%, is Fernando Haddad, a 55-year-old intellectual and former São Paulo mayor who recently replaced jailed former president Luiz Inácio Lula da Silva as the Workers’ party (PT) candidate.

With Brazil struggling to extricate itself from the worst recession in its history and 13 million people out of work, Haddad is promising the country’s 147 million voters a return to the good old days of economic boom Brazil enjoyed under Lula, president from 2003 until 2011.

“We want to be happy again,” Haddad told the Guardian last week. “We have learned Brazil can develop in a way that includes people rather than excluding them. My dream is that Brazil starts to include people again.”

Bolsonaro meanwhile has vowed to “change the destiny of Brazil” by blocking the return of the PT, which he paints as a corrupt clique of Venezuela-admiring, economically incompetent and morally bankrupt communists commanded by the incarcerated Lula.

Bolsonaro and Haddad are trailed by a trio of candidates – Ciro Gomes, Geraldo Alckmin and Marina Silva – who present themselves as sensible centrists capable of unifying a profoundly divided Brazil. None of them look likely to catch up.

What are the key election issues?

'Brazil is at war': election plays out amid homicidal violence Read more

Two issues have dominated the race for power and helped propel Bolsonaro – a self-styled political outsider who casts himself as Brazil’s answer to Donald Trump – to pole position: crime and corruption.

Last year Latin America’s largest economy suffered a record 63,880 homicides – a spiraling public security crisis for which Bolsonaro promises iron-fisted solutions such as loosening gun laws and intensifying police repression. “We are going to hit this area hard,” he vowed this week in a pre-election webcast.

With Brazil still reeling from what some consider the greatest corruption scandal in history, Bolsonaro has also managed to paint himself as a clean-living swamp-drainer determined to purify the filthy world of politics.

Bolsonaro has also tapped into widespread rage at the Workers’ party, which led Brazil into economic catastrophe under Lula’s successor, Dilma Rousseff. Elected Brazil’s first female president in 2010, Rousseff was forced from power in August 2016 by political foes desperate to end 13 years of PT rule.

Bolsonaro himself has become a key election battleground in recent weeks, with his rightwing followers facing off against progressive Brazilians appalled that a man who has repeatedly derided black people, women, indigenous groups and the LGBT community might soon be their leader.

Tens of thousands of protesters took to the streets of cities across Brazil last week as part of an anti-Bolsonaro “not him” mobilization with strong echoes of the 2017 Women’s March on Washington against Donald Trump.

Is Bolsonaro really a tropical Trump?

Bolsonaro revels in the comparison to the United States commander-in-chief. “I’m a Trump admirer,” he told the Guardian earlier this year. His fondness for Twitter, on which he has 1.58 million followers, and his propensity for making rambling yet oddly engrossing speeches has also invited comparisons to the US president.

'He's not perfect': why do so many Brazilians support rightwinger Jair Bolsonaro? Read more

Many, however, see Egypt’s hardline president Abdel Fatah al-Sisi or the Philippines’ President Rodrigo Duterte as more appropriate parallels.

Like Duterte, who recently admitted his only sin was extrajudicial killings, Bolsonaro has vowed to rain hellfire down on the criminals he blames for Brazil’s killing crisis. “There are certain types of people who aren’t humans – they should be treated as hoodlums and crooks,” he told reporters earlier this year.

James N Green the director of Brown University’s Brazil Initiative, said he saw Bolsonaro as being both more erratic and more ideological than the US president.

“Bolsonaro is much more of a wild card than Trump is,” he says.

“Trump built an empire on charlatanism and faking it and deceiving people and did this quite successfully over quite a period of time and therefore has done this quite successfully as president. Bolsonaro’s only claim to fame is his ability to say horrible things about people, and to insult people and to provoke people,” Green adds.

“I don’t even want to imagine what that is going to be like [if he wins].”

Can Bolsonaro be stopped?

Bolsonaro appears to have extended his lead in recent days, with some polls now giving him a 10-point lead over Haddad. But the far-right frontrunner still looks unlikely to secure the first-round majority he needs to claim outright victory on 7 October.

If he fails to do so, a second-round runoff will be held on 28 October between the top two candidates.

Green predicted “an anti-fascist front” against Bolsonaro might form ahead of that historic showdown, with centrists such as Marina Silva and Ciro Gomes potentially throwing their weight behind Haddad, Bolsonaro’s most likely second-round opponent. “People are not going to forget which side people were on.”

However, that support is by no means guaranteed and some polls suggest Bolsonaro could win an eventual duel with Haddad, having gained critical ground among female voters and in north-eastern Brazil, a region traditionally loyal to Lula’s PT.

“Bolsonaro is going to have all of the anti-PT vote, he’s going to have the entire business establishment whose support will be felt in ways that are sometimes not obvious … and he’ll also – and I think this is critical – have the votes of the people who are scared to go outside,” said Brian Winter, the editor-in-chief of Americas Quarterly. “And that is really powerful in Brazil.”

Green said he expected Haddad to eventually triumph but was reluctant to make definite forecasts: “Brazilian history is never predictable.”