SÃO PAULO, Brazil — There has been no lack of drama in the lead-up to Brazil’s presidential election on Sunday. One candidate was jailed, another was stabbed and a week before the voting, women organized nationwide protests against the front-runner.

The presidential contest, the most splintered and divisive race since the end of the military dictatorship in the 1980s, has for many Brazilians come down to who is the least bad option.

Who Is Leading?

The front-runner by a wide margin is the far-right former army captain, Jair Bolsonaro, according to the polls. A member of Congress since 1991, he was long a marginal figure best known for incendiary comments defending Brazil’s military dictatorship and attacking women, gays and blacks.

In addition to electing the next president from a field of 13 candidates, voters will also choose 27 governors and more than 1,600 state and federal lawmakers. In Brazil, there are 147.3 million eligible voters, and voting is obligatory.