Controversial right-wing candidate Jair Bolsonaro was elected president of Brazil on Sunday after defeating leftist opponent Fernando Haddad in a second-round election run-off at the end of a bitter and divisive campaign.

Jubilant supporters descended on the streets outside the former army captain’s home in Rio de Janeiro, letting off fireworks and waving Brazilian flags.

Official results after polls closed gave the 63-year-old  55.7% of the vote with more than 88% of the ballots counted as his pledge to take a heavy-handed approach to rescuing the crisis-prone country resonated with Brazil’s 147 million registered voters.

Bolsonaro has gained international notoriety and provoked comparisons with US President Donald Trump by openly supporting the South American country’s former military dictatorship and making statements deemed misogynist, racist and homophobic.

He will take office on January 1, 2019.

– with reporting from Agence France-Presse