WASHINGTON — He flew across the ocean to celebrate NATO’s 70th anniversary with the largest and most important member of the military alliance. So to outsiders it appeared to be an awkward moment on Tuesday for Jens Stoltenberg, the NATO secretary general, as he sat stiffly by while President Trump criticized German defense spending and predicted that the United States would get along with Russia.

“I accept there are differences, but when it comes to defense spending we all agree,” Mr. Stoltenberg said in an interview after his meeting with Mr. Trump, putting a positive spin on the situation.

He said the president had helped push member states to budget an additional $100 billion in defense spending and credited Mr. Trump with “having a real impact.”

“I say that because it is a fact,” Mr. Stoltenberg said. “Allies are now really stepping up.”

But not all. Germany will most likely slow the growth of its defense spending — meaning that Europe’s economic powerhouse will defy a spending target set by the North Atlantic Treaty Organization. And other member states are struggling to reach the current goal of spending 2 percent of their economic output on the military by the end of 2024.