A conservative wave crashed over Brazil’s political establishment in Sunday’s election, sweeping away many of its traditional pillars and leaving the far-right in the person of Jair Bolsonaro within touching distance of the presidency.

The polemical former army captain, notorious for his misogyny, racism and homophobia, must dispute a run-off round in three weeks’ time against the Workers’ Party candidate Fernando Haddad after falling short of outright victory. But he will do so with an advantage of 18 million votes, having gained 46 per cent of the poll against 29 per cent for the former mayor of São Paulo.

Encouraged by his promise to appoint a prominent liberal economist as his finance minister, Brazil’s financial markets and currency surged after opening Monday on expectations that Bolsonaro will cruise to victory in three weeks’ time.

Despite his strong showing, Bolsonaro in a video recorded after the results were released insinuated he was the victim of fraud, which robbed him of a first-round victory. His son Flávio, elected senator for Rio de Janeiro, earlier in the day shared a video on Twitter that supposedly showed an electronic voting station tampered with to favour the Workers’ Party. The country’s electoral court said the video was fake.

The head of the court, Rosa Weber, said it was still grappling with how to deal with the deliberate spreading of fake news designed to influence voting, especially on Facebook and WhatsApp. Many candidates, including Haddad, were the victim of vicious false rumours about their personal lives spread via WhatsApp groups in the final days of the campaign.

Surveys by leading media organisations show Bolsonaro supporters were the main disseminators of such fake news. His rise in the past three years from the political fringe to within sight of the presidency has been aided by his mastery of social media, which compensated for his lack of time in election broadcasts on television.

Corruption scandals

For 28 years a controversial but marginal figure in the country’s congress, Bolsonaro is benefiting from an anti-incumbency mood among a population fed up with corruption scandals and the longest economic recession in the country’s history, as well as sky-high crime rates.

Fernando Haddad, presidential candidate of Brazil’s leftist Workers’ Party. Photograph: Paulo Whitaker/Reuters

Winning in four of Brazil’s five regions, he eviscerated the traditional centre-right, which saw some of its biggest names felled in down ticket races, and left the Workers’ Party isolated in its traditional bastion of the northeast.

In a brief speech on Sunday night, Haddad said the run-off was a “golden opportunity” for debate and he is now expected to focus on highlighting Bolsonaro’s scant grasp of the complex issues that the next president will face on assuming office. Haddad said contact had already been established with several rivals on the left and centre-left as he seeks to make up ground on his opponent. “We want to unite the democrats of Brazil in a broad-based project that seeks, in a tireless manner, social justice,” he told supporters.

But analysts warned that he would struggle to win the backing of centrist voters if he continued to present himself as a stand-in for Luiz Inácio Lula da Silva, the former president serving a 12-year prison sentence for corruption. Evidence from Sunday’s results is that a large majority of Brazilians reject the Workers’ Party’s claim that Lula is a political prisoner.

Lula’s presence

While the party did manage to retain the largest delegation in the deeply fragmented lower house of congress, it lost the only states it governs outside of the northeast and saw the high-profile bid by Dilma Rousseff, ejected from the presidency in 2016, for a seat in the senate end in abject failure.

Regardless, Haddad visited Lula in his cell on Monday morning to discuss strategy for the run-off. “This is unnecessary and very bad for his campaign,” says André Pereira César, a political scientists in Brasília. “Brazil’s middle ground don’t like it and many who would vote for Haddad will not do so as long as they sense the invisible presence of Lula behind him.”

An even bigger victim of the Bolsonaro wave was the Workers’ Party’s traditional centre-right rival, Brazil’s social democratic party. It was crushed in much of the country by a new harder right that is set to dominate the new congress even if Bolsonaro falls short of the presidency.