SAO PAULO (AP) -- Brazilians are choosing their leaders Sunday in an election marked by intense anger at the ruling class following years of political and economic turmoil, including what may be the largest corruption scandal in Latin American history.
Many had thought that "throw-the-bums-out" rage would buoy the chances of an outsider and end the hegemony of the center-left Workers' Party and the center-right Brazilian Social Democracy Party, which have for years battled it out for the presidency.
Like much in this election, it hasn't turned out as predicted. The man who has benefited most from the anger is a 27-year veteran of Congress -- Jair Bolsonaro -- whose outsider status is based largely on hard-right positions that have alienated as many as they have attracted -- nostalgia for a military dictatorship, insults to women and gay people and calls to fight crime by loosening controls on already deadly police forces.
In second place is former Sao Paulo Mayor Fernando Haddad of the Workers' Party, which has won the last four presidential elections.
Bolsonaro garnered 36 percent in the latest Datafolha poll, with Haddad 14 points behind. The poll interviewed 19,552 people Friday and Saturday and has a margin of error of 2 percentage points. If no one gets a majority on Sunday, a runoff will be held Oct. 28.
"In general, these are the strangest elections I've ever seen," said Monica de Bolle, director of Latin American Studies at Johns Hopkins University. "It's shaping up to be a contest between the two weakest candidates possible."
The campaign to run Latin America's largest economy, which is a major trade partner for countries in the region and a diplomatic heavyweight, has been unpredictable and tense. Former President Luiz Inacio Lula da Silva led initial polls by a wide margin, but was banned from running after a corruption conviction. Bolsonaro was stabbed at a rally in early September and campaigned from a hospital bed in recent weeks. And all along, Brazilians have said their faith in their leaders and their hopes for the future are waning.
This election was once seen as the great hope for ending a turbulent era in which many politicians and business executives were jailed on corruption charges, a president was impeached and removed from office in controversial proceedings, and the economy suffered a protracted recession.
Instead, the two front-runners merely reflect the rabid divisions that have opened up in Brazilian politics following Dilma Rousseff's impeachment and the revelations emerging from the "Car Wash" graft probe.
Bolsonaro, whose base tends to be middle class, has painted a nation in collapse, where drug traffickers and politicians steal with equal impunity, and a moral rot has set in. He has advocated loosening gun ownership laws so individuals could fight off criminals, giving police a freer hand to use force and restoring "traditional" Brazilian values -- though some take issue with his definition of those values in light of his approving allusions to the past military dictatorship and his repeated derisive comments about women, blacks and gay people.
"There is a strong desire for change," said Andre Portela, an economics professor at the Getulio Vargas Foundation, a leading university and think tank. "Bolsonaro has been able to channel that and present himself as the bearer of change, though it's not clear if he really would be."
Haddad and the Workers' Party, meanwhile, have portrayed a country hijacked by an elite that will protect its privileges at all costs and can't bear to see the lives of poor and working class Brazilians improve.
Haddad has promised to roll back President Michel Temer's economic reforms that he says eroded workers' rights, to increase investment in social programs and to bring back the boom years Brazil experienced under his mentor, da Silva.
Caught in the middle are Brazilians who dislike both candidates and see them as symbols of a broken system.
Perhaps nothing has demonstrated the dysfunction more than the Car Wash investigation. Prosecutors alleged that Brazil's government was run like a cartel for years, handing out billions of dollars in public contracts in exchange for kickbacks and bribes. Revelations of suitcases of cash, leaked recordings of incriminating exchanges between powerbrokers and the jailing of some of the of the country's most powerful people unfolded like a Hollywood script -- and then became one: Netflix released a (barely) fictionalized account of the probe this year.
Yet it's not clear that voters will reject the many politicians implicated in the scandal because the electoral system heavily favors incumbents and big parties.
The election has seen large increases in the numbers of candidates from marginalized groups, including black, indigenous and transgender Brazilians, and some think the anti-establishment feelings could translate into a more representative ruling class.