Far-right politician Jair Bolsonaro has won a sweeping victory in Brazil’s presidential election.
The former army captain won 55.2% of the vote against 44.8% for Fernando Haddad of the left-wing Workers’ Party.
Mr Bolsonaro’s pledge to fight crime and corruption following a string of scandals have won him mass support.
However critics are worried by his praise of Brazil’s former dictatorship, and by his comments on race, women and homosexuality.
In one infamous incident in 2015 he told a fellow lawmaker she was too ugly to rape.
For supporters, he is a politician who they say will bring much needed change to the country – a swing to the right after four elections won by the left.
For the past four years, Brazil has been consumed by a criminal investigation – known as Operation Car Wash – that has uncovered massive corruption.
Dozens of business and political leaders have been jailed. Among them was former President Luiz Inácio Lula da Silva, who was barred from standing in the election.
Who is Bolsonaro and what is he likely to do in office?
The 63-year-old leads the Social Liberal Party (PSL), an anti-establishment group that combines social conservatism and pro-market policies.
Mr Bolsonaro is a deeply polarising figure whose controversial remarks earned him the nickname of “Trump of the Tropics”.
He has the past defended the killing of opponents to the country’s former military regime and said he is “in favour of dictatorship”.
But after the results came in, he told supporters he would be a “defender of democracy” and uphold the constitution.
One of his flagship policies is to restore security by relaxing gun laws and suggested that “every honest citizens” should be able to own a gun.
He has promised to reduce state intervention in the economy and indicated that Brazil could pull out of the 2015 Paris Agreement on climate change.
He takes over on 1 January 2019.
Even before the results came out, Mr Bolsonaro’s supporters were dancing for joy – so confident were they of victory.
His promises to get tough on rising crime and his claims of being a clean politician – in a country where many of his rivals have been mired in corruption scandals – have won him millions of admirers.
But his win is going to be a blow for millions.
His links to the military and admiration for the former dictatorship concern many Brazilians, as do his sexist, racist and homophobic remarks.
These are uncertain times, with many worried that – with Mr Bolsonaro in power – the gains made in Brazil since the country returned to democracy 30 years ago could be erased.
Does Mr Bolsonaro have backing in Congress?
Yes and no.
On the one hand, his PSL party achieved a remarkable breakthrough in this month’s legislative election, increasing its representation from one to 52 seats in the lower house.
However Mr Haddad’s PT remains the largest party, with 56 seats.
But most ominously for Mr Bolsonaro, there will be a record 30 parties represented in the next Congress.
This suggest that finding backing for legislation could be difficult for the new president.
What about reaction from outside Brazil?
A number of Latin American leaders congratulated Mr Bolsonaro:
- Argentine President Mauricio Macri described the poll results as Mr Bolsonaro’s “triumph”
- Chilean President Sebastián Piñera congratulated Brazilians for a “clean and democratic election”
- Colombia’s Ivan Duque welcomed the result and called for the two countries’ “brotherly relations” to be strengthened further
- Mexican outgoing President President Enrique Peña Nieto hailed Brazil’s “democratic strength”
- Peru’s Martin Vizcarra wished Mr Bolsonaro “full success”
- Venezuela’s Nicolás Maduro extended his “congratulations to the people of Brazil”
And the US president’s spokeswoman, Sarah Sanders, said on Sunday: “President Trump called President-elect Bolsonaro of Brazil this evening to congratulate him and the Brazilian people on today’s elections. Both expressed a strong commitment to work side by side to improve the lives of the people of the United States and Brazil.”
Meanwhile, Amnesty International said that taking into account his campaign pledges, Mr Bolsonaro’s victory could pose a “huge risk” to Brazil’s indigenous peoples, LGBT communities, black youth, women, activists and civil society organisations.