For those who track the rise of extreme populist nationalism worldwide, this Sunday's election in Brazil represents an important test of how far to the right voters in Latin America's largest nation are prepared to turn.
Amid a race widely regarded as the country's most divisive general election in decades, attention is focused on Jair Bolsonaro, a veteran congressman and retired army captain from the far right.
Bolsonaro has not only led the polls throughout the campaign, but managed to expand his lead in the race's closing days.
Corruption, rampant crime and a stagnant economy has corroded the public's faith in establishment politicians, leading many Brazilians to turn to Bolsonaro as their champion, viewing him as an outsider despite his more than 25 years in congress.
His rise is often compared with that of Donald Trump, whom he admires.
To win outright on Sunday, Bolsonaro must secure more than 50 percent of the votes — a prospect considered unthinkable by Brazil's mainstream political observers only a few weeks ago, but which some now believe conceivable, although unlikely. Otherwise, the top two candidates proceed to a second round on October 28.
The possibility that Bolsonaro, 63, will emerge from these elections as president arouses anger and fear among his opponents, partly because of his record for misogynistic, racist and homophobic remarks, but also because of his close military ties and his admiration for Brazil's oppressive dictatorship between 1964 and 1985.
Last Saturday, hundreds of thousands of Brazilians — many of them women — held demonstrations nationwide, convened by online women's movements whose hashtag -- "#EleNao" or "Not Him" — went viral. Vast crowds gathered in São Paulo and Rio de Janeiro, including many black, LGBT and indigenous Brazilians — all groups denigrated by Bolsonaro over the years.
In Rio, the crowd included Fernanda Moreira, 34, a black woman who teaches young teenagers in one of the city's "favelas" — low-income neighborhoods blighted by violence between the police and criminal drug organizations.
Moreira is especially concerned about Bolsonaro's hard-line views about curbing violent crime in Brazil, which last year saw nearly 64,000 homicides. He favors arming the public with guns, and has heaped praise on the police's routine use of lethal force. Last year he remarked that "a policeman who doesn't kill isn't a policeman."
"I look to the future, and it isn't good," Moreira remarked.
"When I look at Bolsonaro, and when I look at my students, I'm thinking: 'What will a man like him will do to those children?'" she added.
The day after those mass demonstrations, the Bolsonaro campaign countered by holding major rallies of its own, including a procession of thousands of cars that jammed the streets of Brasília, the country's capital. Many of his supporters wore the bright yellow shirt of Brazil's celebrated soccer team, and flourished the national flag shouting "Yes! Him!"
The dueling protests underscored the deep divisions caused by these elections: Families, work colleagues and friends find themselves at opposite poles of a bruising political battle in which debate revolves around the future of democracy in Brazil.
"Families are divided. Old friends from school are not speaking," said Christian Dunker, a professor of psychology at São Paulo University. "This is a kind of new phase in the conscious[ness] of the country, because our own image of being a kind of friendly people, being cordial to each other, [has] collapsed."
The election is all the more unusual because its two chief adversaries have both been confined to quarters. Bolsonaro spent more than three weeks of the campaign in the hospital after being stabbed in the stomach at a September rally in the southeastern city of Juiz de Fora. His primary opponent, former two-term president Luiz Inácio Lula da Silva, is locked up in a prison cell, where he is serving 12 years for corruption.
Polls have consistently showed Lula — as he is universally known — to be by far the most popular politician in Brazil, but on August 31, an electoral court disqualified him from the race because of his criminal convictions.
The man chosen as Lula's stand-in is Fernando Haddad, 55, a former education minister and mayor of São Paulo.
Haddad is an urbane political science professor with little of Lula's turbo-charged charisma, and who has struggled to gain nationwide recognition: At first, some of the cadres from his leftist Workers' Party weren't even sure how to pronounce his name, which is of Lebanese origin. His campaign slogan, "Haddad is Lula!" is intended to appeal to working class Brazilians who fondly remember Lula's government for introducing social programs that helped raise their living standards.
Yet this also exposes Haddad to claims that he is Lula's "puppet," a useful weapon in the hands of the Bolsonaro camp, which portrays the governments of Lula, and his successor, Dilma Rousseff, as the free-spending authors-in-chief of Brazil's worst-ever recession and chief culprits in the massive Car Wash corruption kickbacks-for-contracts scandal
A survey by the polling company Ibope, taken Wednesday, showed Haddad with 23 percent, trailing Bolsonaro by nine points. Of the 13 candidates in Brazil's presidential race, he is in second place, and is widely expected to get through to the second round to face Bolsonaro in a showdown between the left and the far right. The same poll showed, in that final round, the two men are tied.
If it plays out that way, the second round is sure to be a ferocious battle, much of it waged amid highly charged emotions and a tsunami of fake news. Bolsonaro enters the fight with some weighty supporters — from army generals to Brazil's highly influential evangelical and agricultural lobbies.
His opponents will likely continue to highlight his most controversial and offensive behavior, which includes telling a congresswoman in 2003 that she didn't deserve to be raped by him. Whether this works is a moot point. Bolsonaro is markedly less popular among women than men. Yet polls this week showed a significant rise in female support to around 26 percent — after the "Not Him" protests.
Many Brazilians appear willing to accept Bolsonaro's claims that his comments were either taken out of context or are fake news, and his insistence that he is on a mission to unify all Brazilians. Others view them as insignificant given the scale of the crisis facing Brazil.
"I believe he is a male chauvinist and homophobic, like other politicians," said Amanda Lemos, 21, a psychology student from Rio, during a recent pro-Bolsonaro rally on Copacabana Beach.
"But he's the only candidate who seems to have a strong plan to begin to lead Brazil out of chaos."
No one in Brazil seems to dispute that this is election is a defining moment for the country amid an uncertain time. The issue of who will be president will soon be settled. But, says Dunker, the psychoanalyst, the painful divisions that this process has exposed within Brazilian society will continue, whatever the outcome.
"I am afraid we will never recover," he says.