DAVOS, Switzerland — On the campaign trail, Donald J. Trump the candidate denounced what he called “the false song of globalism.” A year after taking office, President Trump came on Friday to tell the elites at Davos, who composed the song, that maybe they could still perform in harmony.

In an encounter that might have surprised even him two years ago, Mr. Trump reassured the world’s political and financial leaders that his “America First” agenda was not a rejection of international cooperation. The combative nationalist gave way to the let’s-make-a-deal businessman, as he invited them to invest in what he called a resurgent United States.

“I believe in America,” Mr. Trump told a jampacked auditorium on the last day of the annual World Economic Forum in Davos. “As president of the United States, I will always put America first, just like the leaders of other countries should put their country first also. But America first does not mean America alone. When the United States grows, so does the world.”

That did not mean Mr. Trump has joined the globalism chorus. He has spent much of the last year trying to dismantle the international political and economic system represented by the Davos consensus — ripping up or renegotiating trade agreements, threatening or imposing tariffs on imports and working to curb the flow of immigration. In his speech on Friday, Mr. Trump insisted that cross-border trade had to be made fairer and vowed to take action against predatory practices.