Donald Trump‘s top national security official has met with Jair Bolsonaro in what Brazil‘s president-elect called a “very productive” encounter.

National security adviser John Bolton met the far-right future leader, who is openly racist, homophobic and sexist, having previously praised him as “like-minded” and called his election a “positive sign” for Latin America.

Like Mr Trump, Mr Bolsonaro was elected after riding a wave of popular anger against traditional politicians. He has vowed to sweep out corruption, crack down on crime and align Brazil closely with the US in a shift towards conservative nationalism.

An army helicopter hovered nearby as he and Mr Bolton met in his gated, beachside community in Rio de Janeiro.

They discussed improving trade ties between their countries, as well as developments in Cuba and Israel, Mr Bolsonaro said later. The president-elect has said he wants to move Brazil’s embassy in Israel to Jerusalem from Tel Aviv, following in Mr Trump’s footsteps.

The encounter was also attended by Mr Bolsonaro’s future national security adviser, General Augusto Heleno, and future defence minister, General Fernando Azevedo, both retired Army officers, and incoming foreign minister, Ernesto Araujo, an anti-globalist who believes climate change is a Marxist invention.

Mr Bolsonaro has threatened to follow the lead of his North American counterpart and pull Brazil – home to the world’s largest rainforest – out of the Paris climate agreement.

On Wednesday, he said he had pushed the government to withdraw Brazil’s offer to host the UN climate conference next year, maintaining that Brazil’s sovereignty over the Amazon was at stake.

Brazil election: far-right candidate Jair Bolsonaro wins Presidency Show all 8 1 /8 Brazil election: far-right candidate Jair Bolsonaro wins Presidency Brazil election: far-right candidate Jair Bolsonaro wins Presidency A man holds an inflatable figure of jailed former president Luiz Inacio Lula da Silva as supporters of far-right presidential candidate Jair Bolsonaro celebrate in front of the National Congress in Brasilia, after the former army captain won Brazil's presidential election AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of the left-wing presidential candidate for the Workers Party (PT), Fernando Haddad, react in Rio AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Police officers patrol the streets during a gathering of supporters of the left-wing presidential candidate for the Workers Party AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Fernando Haddad, presidential candidate of Brazil's leftist Workers Party (PT), is kissed by his wife Ana Estela Haddad Reuters Brazil election: far-right candidate Jair Bolsonaro wins Presidency epa07128316 Supporters of Socialist candidate Fernando Haddad react after he was defeated by far-right candidate Jair Bolsonaro, in Rio de Janeiro, Brazil, 28 October 2018. With 99.4 percent of ballots counted, Bolsonaro won the second round of the elections with 55.1 percent of the votes, compared to 44.9 percent obtained by Fernando Haddad, successor of Luiz Inacio Lula da Silva and candidate of the PT, or Workers Party. EPA/JULIO CESAR GUIMARAES JULIO CESAR GUIMARAES EPA Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of the left-wing presidential candidate for the Workers Party (PT), Fernando Haddad, react in Rio de Janeiro, Brazil, after the far-right candidate Jair Bolsonaro won Brazil's presidential election, in Rio de Janeiro, Brazil, on October 28, 2018. - Far-right former army captain Jair Bolsonaro was elected president of Brazil on Sunday, beating leftist opponent Fernando Haddad in a runoff election after a bitter and polarized campaign. Official results gave the controversial president-elect 55.18 percent of the vote with more than 99.7 percent of the ballots counted. (Photo by Daniel RAMALHO / AFP)DANIEL RAMALHO/AFP/Getty Images DANIEL RAMALHO AFP/Getty Images Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of far-right presidential candidate Jair Bolsonaro, celebrate in front of the National Congress in Brasilia, after the former army captain won Brazil's presidential election, according to official results that gave him 55.7 percent of the vote, on October 28, 2018. - Far-right former army captain Jair Bolsonaro was elected president of Brazil on Sunday, beating leftist opponent Fernando Haddad in a runoff election after a bitter and polarized campaign. Official results gave the controversial president-elect 55.18 percent of the vote with more than 99.7 percent of the ballots counted. (Photo by Sergio LIMA / AFP)SERGIO LIMA/AFP/Getty Images SERGIO LIMA AFP/Getty Images Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of Jair Bolsonaro gather outside the Federal Police headquarters where Brazilâ€™s former President Luiz Inacio Lula da Silva is serving a prison sentence, after Bolsonaro wins the presidential race in Curitiba, Brazil October 28, 2018. REUTERS/Rodolfo Buhrer RODOLFO BUHRER REUTERS

It came after new figures revealed that deforestation in the Amazon had reached its highest level in a decade, with 7,900sq km of rainforest felled in just 12 months.

Mr Bolton told reporters on Tuesday in Washington that Mr Bolsonaro’s election was a “historic opportunity” for Brazil and the US to work together on security, economics and other issues. Thursday’s meeting would prepare the ground for Trump and Bolsonaro to “get off to a running start”, he said.

At the meeting he invited Mr Bolsonaro to Washington to meet Mr Trump, he said in a tweet; the president-elect later accepted the offer.

Mr Bolton added: “Enjoyed a wide-ranging, very productive discussion with Brazil’s President-elect Bolsonaro & his national security team. We look forward to a dynamic partnership with Brazil.”

Support free-thinking journalism and attend Independent events

On Tuesday, Mr Bolsonaro’s son Eduardo met Jared Kushner, Mr Trump’s son-in-law, at the White House. The younger Bolsonaro said afterward that the Israel embassy move was ”not a question of if, but of when”.