BRUSSELS — President Trump wasted no time. NATO’s secretary general, Jens Stoltenberg, could barely finish the greetings at Wednesday’s breakfast when Mr. Trump launched into a clearly preplanned attack.
It wasn’t directed at terrorism. It wasn’t against a military threat. Instead, it was aimed at Germany, one of the alliance’s most important members.
“Germany, as far as I’m concerned, is captive to Russia because it’s getting so much of its energy from Russia,” Mr. Trump told the startled Mr. Stoltenberg at the opening of the NATO summit meeting. “We have to talk about the billions and billions of dollars that’s being paid to the country we’re supposed to be protecting you against.”
“I think it’s something that NATO has to look at,” Mr. Trump said.
Chancellor Angela Merkel of Germany, politically weakened at home, reacted mildly but pointedly to Mr. Trump’s remarks, noting that she grew up in Soviet-occupied East Germany. “I myself experienced a part of Germany that was controlled by the Soviet Union, and I am very happy today that we are united in freedom as the Federal Republic of Germany,” she said as she entered the NATO building. “We decide our own policies and make our own decisions, and that’s very good.”
(Our reporters fact-checked President Trump’s claims about Germany’s energy imports from Russia.)
The gentle rejoinder given by Ms. Merkel, leader of Europe’s most powerful country, seemed to encapsulate the complexities she faces in dealing with Mr. Trump. It also reflected her seeming reluctance to be the Western democratic voice that publicly stands up to him.
Ms. Merkel has rebuked Russia’s aggression in Ukraine and has defended multilateral institutions like the European Union, NATO, the United Nations and the World Trade Organization. She also has spoken openly about the need for Europe to do more in its own interests and rely less on the United States in the age of the Trump administration.
But Ms. Merkel has been hesitant to engage in harsh exchanges with Mr. Trump. In fact, her foreign minister, Heiko Maas, gave a much sharper response to Mr. Trump’s disparaging remarks on Wednesday, writing on Twitter, “We are no captives — neither of Russia nor of the United States.”
Ms. Merkel and the American president clearly have a strained personal relationship. German officials say that when Mr. Trump speaks on the phone with Ms. Merkel, he harangues her from the start about Germany’s military spending and its trade surplus with the United States, almost before the usual pleasantries are made.
While it is clear Ms. Merkel makes Mr. Trump uncomfortable, she hesitates to speak for Europe — especially now that her own political position in Germany is weaker and subject to challenge, both from the right and from her coalition partners on the left, the Social Democrats.
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.”
Asked if the pipeline issue had come up, Mr. Trump said that it had. For her part, Ms. Merkel was nonconfrontational. “I am pleased to have this opportunity to be here for this exchange of views,” she said, which extended to economics, migration and “the future of our trade relations.”
She concluded: “We are partners, we are good partners, and wish to continue to cooperate in the future.”
Mr. Trump had been advertising his intention to read the Riot Act to NATO allies about military spending, calling Americans “the schmucks that are paying for the whole thing” and vowing last week: “I’m going to tell NATO — you got to start paying your bills. The United States is not going to take care of everything.”
But his animus toward Germany, which spends about 1.24 percent of its G.D.P. on defense and has a large trade surplus with the United States, came out in fierce and startling terms. Mr. Trump has regularly criticized Germany for what he has described as the prevalence of German-made cars on American streets and for taking advantage of American largess to spend less on defense and more on education and social welfare. He has threatened the European Union with new tariffs on imported cars, as well as those already imposed on steel and aluminum.
But in the meetings on Wednesday, Mr. Trump framed his criticism in security terms.
“I have to say, I think it’s very sad when Germany makes a massive oil and gas deal with Russia where we’re supposed to be guarding against Russia,” Mr. Trump went on. “We’re supposed to protect you against Russia, but they’re paying billions of dollars to Russia and I think that’s very inappropriate.”
The Nordstream II pipeline project has been opposed by the United States for many years, including under President Barack Obama, as well as by some European countries, like Poland, that warn it will give Russia too much leverage.
Nordstream II would add two pipelines to the existing Nordstream pipeline and increase overall annual capacity to 3.9 trillion cubic feet.
The Germans argue that they have been diversifying their gas supplies, that they now get only about 9 percent of their energy from Russia — not the 70 percent that Mr. Trump claimed — and that Washington is angling to sell liquid natural gas to Germany instead.