Brazilians fed up with political corruption and rising crime are expected to vote informer army captain turned politician Jair Bolsonaro as their president today in a turbulent swing to the right in the world's fourth largest democracy.

Mr Bolsonaro's sudden rise was propelled by rejection of the leftist Workers Party (PT) that ran Brazil for 13 of the last 15 years and was ousted two years ago in the midst of the country's worst recession and biggest graft and bribery scandal.

His leftist rival Fernando Haddad, standing in for the jailed PT founder and former Brazilian president Luiz Inacio Lula da Silva has been trailing Mr Bolsonaro since the first round vote three weeks ago.

But final opinion polls yesterday showing Mr Haddad gaining momentum and endorsements from leading legal figures in Brazil’s unprecedented fight against political corruption have raised hopes among his supporters that he can pull off what would be a stunning upset win.

Read more: All you need to know about Brazil's divisive election

Mr Haddad has reduced Mr Bolsonaro's lead from 12 to eight percentage points in five days, according to the Ibope polling firm that gave him 46% of voter support compared with Mr Bolsonaro's 54%. A Datafolha poll also released last night showed Mr Bolsonaro had 55% and Mr Haddad had 45%.

Mr Haddad failed to win the crucial endorsement of center-left former candidate Ciro Gomes, a former governor of Cear state in the northeast, which would have given Mr Haddad a big lift in Brazil's poorest region.

But Rodrigo Janot, Brazil's former prosecutor general under whose watch unprecedented prosecutions of endemic political graft took place, tweeted that he would vote for Mr Haddad.

Popular anti-corruption judge, Joaquim Barbosa, who jailed several top PT leaders for corruption, also came out for Mr Haddad.

The endorsements were a blow to Mr Bolsonaro's campaign to position himself as the only anti-corruption candidate.

"I think we are at the brink of a process that could push our democracy beyond its limits," Mr Janot said.

Many Brazilians are concerned that Mr Bolsonaro, an admirer of Brazil's 1964-1985 military dictatorship and a defender of its use of torture on leftist opponents, will trample on human rights, curtail civil liberties and muzzle freedom of speech.

The 63-year-old seven-term congressman has vowed to crackdown on crime in Brazil's cities and farm belt by granting police more autonomy to shoot at armed criminals and easing gun laws to allow Brazilians to buy weapons to fight crime, a major demand by one of his biggest backers, the powerful farm lobby.

"This is not just an election. We only have two options: to turn right or left, and we all know where the left took us for 13 years with the PT," Mr Bolsonaro said in his final video address to supporters yesterday evening. "We want a free Brazil."