“Once again, we’ve seen Dr. Jekyll and Mr. Hyde,” said Sylke Tempel, the editor in chief of Internationale Politik, published by the German Council on Foreign Relations, remarking on the approach that Mr. Trump took during the leaders’ joint news conference on Friday.

“He was Mr. Jekyll while reading his statement, saying nice things about economic ties, his commitment to Ukraine, common friendship; all the niceties,” Ms. Tempel said. “Then, in the question-and-answer session, he’s his old self: disparaging the media, criticizing the British.”

Although memories of Ms. Merkel’s warm relationship with President Barack Obama remain fresh in the minds of many Germans, it took repeated meetings over several years before the chancellor reached that level with Mr. Obama. During a joint news conference in Dresden in June 2009, she displayed stiff body language and a chilly formality, months after she had denied Mr. Obama permission to speak in front of the Brandenburg Gate during the 2008 presidential campaign.

In 2006, Mr. Obama’s predecessor, President George W. Bush, sought to win her over with a playful shoulder rub, a move abruptly rebuffed by the pragmatic chancellor. One year later, however, at the summit meeting of the Group of 8 industrialized nations, she coaxed Mr. Bush to voice support for her vision of a global plan to combat climate change.

Yet both of Mr. Trump’s most recent predecessors followed diplomatic conventions and worked within the institutions established after World War II to foster communication and cooperation among nations.

Mr. Trump’s “America First” approach and his disparagement of global trade agreements have caused uncertainty among German politicians and industry leaders. Asked by a German journalist about this approach, the president insisted that while he was not against trade, the United States had been treated unfairly in global trade agreements. “But I am not an isolationist,” he said.

Less than 24 hours later, however, Mr. Trump’s government refused to back a pledge to fully oppose trade protectionism at a meeting in Baden-Baden, Germany, of the finance ministers of the Group of 20, which comprises industrial and emerging-market countries as well as the European Union. Participants last year had agreed to resist “all forms” of protectionism.