Far-right candidate Jair Bolsonaro has won a sweeping victory in Brazil’s presidential election.
With almost all of the votes counted, Mr Bolsonaro has 55% of the votes against 45% for Fernando Haddad from the left-wing Workers Party.
Mr Bolsonaro campaigned on a promise to eradicate corruption and to drive down Brazil’s high crime levels.
The election campaign has been deeply divisive. Each camp argued that victory for the other could destroy Brazil.
- What are Jair Bolsonaro’s policies?
- Jair Bolsonaro: Trump of the Tropics?
- Election drives wedge between friends
The result represents a marked right-wing swing in the country which was under military rule from 1964 to 1985.
Pointing to the number of former members of the military he surrounds himself with, his opponents argue that Mr Bolsonaro poses a risk to Brazil’s democracy.
Mr Bolsonaro also alienated many Brazilians with his homophobic, racist and misogynistic remarks.
But many of his supporters view him as a “saviour” who will make Brazil safer and who will stand for traditional values such as opposing the legalisation of abortion.
Some celebrated in the street outside Mr Bolsonaro’s home in Rio de Janeiro, waving Brazilian flags and letting of fireworks.
One of Mr Bolsonaro’s flagship campaign issues has been to increase security for Brazilian citizens. He has portrayed himself as a hardliner who will restore safety to Brazil’s streets.
He has indicated that his government will aim to relax laws restricting the ownership and carrying of guns.
His economic policy plans include proposals to reduce government “waste” and promises to reduce state intervention in the economy.
He has suggested that Brazil could pull out of the 2015 Paris Agreement on climate change, arguing that its requirements compromise Brazil’s sovereignty over the Amazon region
Mr Bolsonaro has also said that he will “cleanse” Brazil of corrupt politicians, a campaign promise which has been very popular with Brazilians who say they are tired of the corruption which has seen dozens of high-ranking politicians from the established parties jailed.
The Workers’ Party candidate, Fernando Haddad, had tried to distance himself from the corruption scandals which had rocked his party but for many voters that was not enough.
Mr Bolsonaro will be sworn in on 1 January 2019 and replace outgoing President Michel Temer, who is leaving office with a record low approval rating of 2%.