Brazil election: Voters debate the merits of democracy as far-right candidate leads polls
Should Brazil stick to democracy, or not? Unlikely as it might seem to outsiders, this has been a key debating point as Latin America's largest country edges towards its election.
With just two days to go, a new survey by Datafolha suggests 69% of Brazilians believe democracy is the best way forward.
However, some are concerned that leading candidate Jair Bolsonaro - a far-right former army captain - will threaten this path.
He has talked positively of the military junta which ruled the country from 1964 to 1985, and promised to fill his cabinet with generals.
"I'm in favour of a dictatorship!" he said boldly in a 1993 speech, Reuters news agency reports. "We will never resolve grave national problems with this irresponsible democracy!"
Current polling has him on a comfortable 35%, which is set to take him into the second round where he is likely to meet left-wing Fernando Haddad, standing for the Workers' Party (PT).
How did the last TV debate play out?
In the candidates' final meeting on Thursday night, the future of the democracy was addressed.
Mr Bolsonaro did not take part, under doctors' orders. He was stabbed at a campaign rally in September and was only released from hospital last weekend.
However, he did manage to give a television interview to a channel that has given him favourable coverage. It was aired simultaneously and his critics said it was a move to avoid being challenged.
Guilherme Boulos, a candidate for the Socialism and Liberty party, used the debate to send a warning to viewers.
"[The dictatorship] was 30 years ago now, but I think we have never been so close to what happened back then..." he said. "This is always how it starts out: guns, sorting things out with violence, human lives worth nothing."
What are Bolsonaro's chances?
He has vowed to get tough on crime after a spike in the homicide rate. He has said he will loosen gun laws so citizens can protect themselves.
His approval rating has climbed and he picked up even more supporters after he was attacked. Datafolha's polling suggests he is also the current leading choice for young people and Brazilian women, even though he is known for having made misogynist, racist and homophobic comments.
Polling companies give him roughly a 30% chance of winning the race outright, according to Reuters news agency.
His supporters hope more voters might be silently in his camp but are not making their intentions known to pollsters.
However, most analysts believe he will end up in the 28 October run-off, and current projections suggest his likely run-off with Mr Haddad is too close to call.
Mr Haddad has 22% support for the first round.
Despite being former mayor of São Paulo, he is largely unknown in many parts of the vast country. He was only named as the candidate for just over three weeks before election day. The party was pinning its hopes on ex-President Luiz Inácio Lula da Silva but he was banned from standing as he is serving prison time for corruption convictions.
A criminal investigation has seen a number of Brazilian politicians jailed for corruption, including Lula and various other PT leaders, losing the party many voters.