Brazilian presidential candidate for the Workers' Party, Fernando Haddad, greets supporters in Sao Paulo, Brazil, after official results gave candidate Jair Bolsonaro 55.7 percent of the vote of the presidential run-off election, on October 28, 2018.
He takes over from Mr Temer on 1 January 2019. The content of his speech was conciliatory and antagonistic in equal measures, claiming he would be a president "for all Brazilians", while also doubling down on his promises to rid the country of what he calls "communism, socialism, populism and left-wing extremism".
Bolsonaro's home in Rio de Janeiro was flooded with supporters following the announcement, who waved Brazilian flags and set off fireworks.
Brazil is in deep recession, almost 13 million people are without jobs, a large number of its politicians are badly stained by corruption, and crime has skyrocketed - with almost 64,000 people killed in 2017. He has a history of disparaging remarks against LGBT people, women and minorities and has spoken of his support for torture and extrajudicial police killings. "For the first time I feel represented", said Andre Luiz Lobo, 38, a businessman who - not incidentally, given the accusations of racism against his candidate - is black. In Brazil's commercial capital of Sao Paulo, Bolsonaro's win was greeted with fireworks and the honking of auto horns.
Trump spoke of "a strong commitment to work side-by-side" on issues affecting Brazil, the USA and beyond, the White House said.
"From one continent to another - from [Viktor] Orban to [Donald] Trump; from [Matteo] Salvini to Bolsonaro - [support for] democracy is wavering".
On the other side, the reaction was despair - and a defiant vow to resist.
Reasons to Buy the iPhone XR (and 3 Reasons to Skip)
Phones like the XR and Google's Pixel models use software instead to achieve the same effect with just one camera . In our country began selling the new smartphone iPhone XR from Apple , the most affordable in its line-up in 2018.
With 96% of the votes counted, the former army captain has 55.5% of the votes while leftist Fernando Haddad of the Workers' Party has 44.5%, the Supreme Electoral Tribunal said. The State Department added that the US "look [s] forward to working with President-elect Bolsonaro in the coming years", in areas of mutual concern "to promote security, democracy, economic prosperity, and human rights".
"I'm surprised Brazilians would vote for hate, for guns", said Flavia Castelhanos, 31, after wiping away her tears, wearing a pin that said "Not him" - opponents' rallying cry against Bolsonaro.
Political analysts and activists reacted to the news in grim tones.
He has also pledged to help efforts led by the United States to isolate the Maduro regime in Venezuela, as thousands of Venezuelans flee to Brazil every day in need of humanitarian assistance.
"Brazil will not become a dictatorship, we won't see congress closed", said Mauricio Santoro, a political scientist and professor of global relations at Rio de Janeiro State University.
The environmental group Amazon Watch warned victory for Bolsonaro - who has vowed not to let conservation programs interfere with agro-industry - "spells disaster for the Brazilian Amazon".
He also demanded that the rights of those who had not voted for Mr Bolsonaro be respected.
Many observers cast doubt on the legitimacy of the election after former president Lula da Silva was barred from running in contravention of the UN Human Rights Committee, and Lula had very restricted access to the media. But he is also very much a product of a ideal storm in Brazil that made his messages less marginalized: widespread anger at the political class amid years of corruption, an economy that has struggled to recover after a punishing recession and a surge in violence.