They have called the idea of spending 2 percent of gross domestic product on defense — which Mr. Trump has not only insisted on but now says he wants to double — ludicrous and arbitrary.
That view is shared by many Germans, which led Ms. Merkel to record a video over the weekend explaining why she believed Germany must spend more on defense, as pledged. But the more Mr. Trump attacks Germany, the less its people feel like appeasing him on military spending or with trade concessions.
While President Emmanuel Macron of France has tried to curry favor with Mr. Trump, playing the role of the devoted mentee, Ms. Merkel has kept her distance. Neither approach has worked with Mr. Trump. And when he becomes aggressive or mocking, as he did in private sessions during the Group of 7 summit meeting last month in Canada, Ms. Merkel simply does not react, perhaps to avoid setting him off further.
By charging that Germany is in thrall to Moscow, through a new gas pipeline from Russia called Nordstream II, Mr. Trump appeared to be trying to deflect criticism that he is too accommodating toward President Vladimir V. Putin of Russia, suggested Derek Chollet, a former assistant secretary of defense who is now with the German Marshall Fund in Washington.
Mr. Trump and Mr. Putin are scheduled to meet on Monday in Helsinki, Finland.
“This is like throwing a match on kindling, since Germany was anticipating something like this after the Group of 7” meeting in Canada, Mr. Chollet said. “Trump went out of his way in his first meeting to send this unprovoked attack.”
Mr. Trump and Ms. Merkel talked later Wednesday in a bilateral meeting that lasted an hour, and appeared to go out their way to be cordial.
“We have a very, very good relationship with the chancellor, we have a tremendous relationship with Germany,” Mr. Trump said. “We’re having a great meeting. We’re discussing military expenditure, we’re talking about trade.” Noting Germany’s “tremendous success,” Mr. Trump added, “And I believe that our trade will increase and lots of other things will increase, but we’ll see what happens.”