Bolsonaro, 63, has built an image as a political outsider ready to rough up the establishment -- no small feat given that, unlike the US president, he is a longtime politician.
The seven-term congressman has few legislative initiatives to his record but, crucially, has not been caught up in the massive corruption scandals that have made Brazilians furious with the political class in recent years.
But he has made enemies with his intolerant comments directed at women, gays and blacks, while fondly recalling Brazil's brutal military dictatorship (1964-1985), in which he served as an army captain.
"The dictatorship's mistake," he said two years ago, "was to torture and not kill" leftist dissidents and suspected sympathizers.
But Bolsonaro has promised that if elected he would govern "with authority, but not authoritarianism."