LONDON — America’s traditional allies are on the lookout for new friends.

They have heard the mantra “America First” from the new president, divining a Trump doctrine: global cooperation last. Europeans have taken note of Mr. Trump’s denigration of the European Union and his apparent esteem for the Russian president, Vladimir V. Putin. In Asia and Latin America, leaders have absorbed the deepening possibility that Mr. Trump will deliver on threats to impose punitive tariffs on Mexican and Chinese imports, provoking a trade war that will damage economic growth and eliminate jobs around the world.

Some allies are shifting focus to other potential partners for new sources of trade and investment, relationships that could influence political, diplomatic and military ties. Many are looking to China, which has adroitly capitalized on a leadership vacuum in world affairs by offering itself — ironies notwithstanding — as a champion for global engagement.

“We’ve always said that America is our best friend,” Jeroen Dijsselbloem, president of the Eurogroup — comprising finance ministers from countries sharing the euro currency — said in an interview with The New York Times on the sidelines of the World Economic Forum in Davos, Switzerland, this month. “If that’s no longer the case, if that’s what we need to understand from Donald Trump, then of course Europe will look for new friends.”

“China is a very strong candidate for that,” he added. “The Chinese involvement in Europe in terms of investment is already very high and expanding. If you push away your friends, you mustn’t be surprised if the friends start looking for new friends.”