PALM BEACH, Fla. — President Trump hosted President Jair Bolsonaro of Brazil for a festive dinner at his Florida estate on Saturday but refused to rule out steel and iron tariffs that have created tension in the relationship between the two most populous countries of the Western Hemisphere.

As he welcomed Mr. Bolsonaro to Mar-a-Lago, Mr. Trump hailed his Brazilian counterpart and celebrated their friendship. “Brazil loves him,” the president said with Mr. Bolsonaro at his side. “The U.S.A. loves him. Great job.”

Asked about tariffs, Mr. Trump initially ducked the question, saying only, “The friendship is probably stronger now than it’s ever been.” Pressed if he would forgo tariffs, he said, “I don’t make any promises.”

Mr. Trump and Mr. Bolsonaro enjoy one of the closest relationships that the president has in the Western Hemisphere. A conservative advocate of immigration restrictions like the American leader, Mr. Bolsonaro is often called the Trump of the Tropics and his son, Eduardo Bolsonaro, has made a point of visiting Mar-a-Lago on his own more than once to rub shoulders with top Trump administration officials and allies.