Former army officer Jair Bolsonaro, a fan of the dictatorship that stretched from the 1960s to the 1980s, has been often labeled a Brazilian Donald Trump. Bolsonaro, 63, is a far-right candidate whose insults against gays and women, and his praise for the torturers of the 1964-85 dictatorship, have deepened Brazil's political divides.
Brazil: MST Marches at Supreme Court, Demand Lula's Freedom
For all his deeply conservative views, Bolsonaro especially benefits from the support of young Brazilians on social media, with 1.2 million Twitter subscribers and almost 5.5 million Facebook followers.
Support is greatest among the young, with 26 percent, and among the better off, with 34 percent. Bolsonaro also finds backing among evangelical Christians for his uncompromising anti-abortion stand.
Bolsonaro also takes advantage of the fact he is one of the very few well-known Brazilian politicians who has not been investigated, let alone charged, in the mammoth "Car Wash" graft scandal shaking the elite, allowing him to campaign as an outsider.
However, he has been a member of Congress from Rio de Janeiro since 1991, though not a particularly prominent one, passing only two bills in those 27 years.
Among his proposals, Bolsonaro offers to loosen Brazil's tight gun ownership restrictions to allow self-defense, instead of tackling the corruption among the police forces, and regardless of the recurrent mass shootings that have plagued the United States as a result of such policy.
In 2014 in the lower house of Congress he told a leftist member, Maria do Rosario, that she "didn't deserve" to be raped, because of her looks.
During the controversial 2016 impeachment of leftist president Dilma Rousseff, who had suffered torture under the dictatorship, Bolsonaro praised one of the most notorious figures of that repression.
His anti-homosexual statements are famously severe, including telling Playboy magazine in 2011 that he would rather see his own son "die in an accident" than ever come out as gay.
Polls show that in a runoff vote he be 10 percentage points behind environmentalist, socially conservative Marina Silva. An even larger margin separates Bolsonaro from former President Lula da Silva.
But even if the ex-army officer doesn't capture his objective, Brazil is likely to be taking notice of the Bolsonaro name for a while: he has three politician sons, one of them a congressman and the other two local politicians in Rio de Janeiro.