Brazil's right-wing President Jair Bolsonaro offered his support to US counterpart Donald Trump on Monday amidst widespread criticism for the killing of a top Iranian commander.

As thousands of mourners in Tehran paid their respects to the slain head of the Revolutionary Guards' Quds Force, Qasem Soleimani, and Iran vowed "severe revenge," Bolsonaro backed Trump's fight against "terrorism."

"We don't accept terrorism. If we have a terrorist in Brazil, we would deliver him" to justice, Bolsonaro told journalists in Brasilia.

While many countries called for a de-escalation of tensions in the Middle East, Brazil was one of the few to back Trump over the drone attack.

Bolsonaro also played down the surge in oil prices and a slump in stocks provoked by the rising US-Iran tensions.

"I admit that prices have gone up in service stations," he said, but "it seems that... the impact hasn't been that great. It seems to be stabilizing."

Populists Trump and Bolsonaro have been allies since assuming power in their respective countries.

Bolsonaro has also backed Trump to win a second term in US elections in November.

"Trump will be re-elected. Does anyone doubt it?" he said. "The country is doing very well."

Another thing the two leaders have in common is a distrust of the mainstream media, which is often critical of them.

But Bolsonaro, 64, expects to outlast the press.

"Those who don't read the newspapers are uninformed and those who read them are misinformed. You have to change that. You're an endangered species," said Bolsonaro, joking that he would have to put journalists under the protection of Brazil's environment institute.

During his election campaign in 2018, Bolsonaro often clashed with the media and preferred to communicate with his supporters through social media, much like Trump.

Last month, he told a journalist -- who had been questioning Bolsonaro about a corruption case involving one of his sons -- that he had "the face of a homosexual," although the president later apologized.