BRUSSELS — President Donald Trump said Thursday that it is “unnecessary” for the United States to pull out of the North Atlantic Treaty Organization, citing European nations’ commitments to increase spending on their own militaries on an accelerated timeline.

Speaking at a press conference at the end of a two-day summit here, an unusually sedate Trump said he had been “extremely unhappy” with the reluctance of many NATO nations to meet an agreed-upon goal of each country spending 2 percent of its gross domestic product on defense. That changed overnight.

But it was not clear that Trump had actually extracted any new concessions from U.S. allies. The leaders of the 29-member nations released a 79-point joint declaration Wednesday, and French President Emmanuel Macron said Thursday that Trump had neither raised the specter of leaving NATO nor secured new promises to increase funding from his partners at the summit.

"President Trump never at any moment, either in public or in private, threatened to withdraw from NATO," Macron said.

NATO Secretary General Jens Stoltenberg, in his own press conference soon after, said the talks between Trump and the leaders of other NATO members had been a “frank and open discussion” that “made NATO stronger."

"It has created a new sense of urgency,” he said, adding that "a clear message from President Trump is having an impact.”

While Trump was short on detail, he was long on unity — the theme U.S. officials and European leaders had hoped would emerge in advance of Trump’s summit with Russian President Vladimir Putin next week — though his narrative of solidarity was immediately challenged by Macron and others.

“It all came together at the end,” Trump said.

Still, Trump’s tone and his demands were much different Thursday morning than they had been Wednesday, when he asked NATO countries to raise their defense-spending threshold to 4 percent of GDP and slammed Germany as a “captive” of Russia because it buys oil and gas from Moscow.

Whether he made an explicit threat or not, the president has often wondered aloud about the utility of NATO and its value to the U.S. Trump told fellow NATO leaders at an emergency session that the U.S. would "do our own thing" if they don't step up their defense spending more.

Asked Thursday whether he was threatening to pull out of NATO for any reason — and whether he could do that without Congress — Trump chose to lower the temperature.

“I think I probably can,” Trump said, “but that’s unnecessary.”

Trump had been absorbing fierce criticism from foreign policy experts across the political spectrum before he shifted into conciliatory mode at his impromptu morning press conference.

"I think he is launching a broad attack on foundations of European unity and Trans-Atlantic relations conveniently couched as demanding fair share for U.S. in trade and security costs," Vali Nasr, dean of Johns Hopkins University's School of Advanced International Studies, told NBC Wednesday.

Tennessee Republican Sen. Bob Corker, the chairman of the Foreign Relations Committee, said it was worthwhile to press NATO members to increase their defense spending but not in a manner that fractures the alliance.

"I’m very concerned that we have a rough meeting with NATO and then some kind of conciliatory meeting with Putin and it works against our country’s national interest, " Corker said earlier this week. "Hopefully that won't happen."

Reiterating that he sees Putin as a "competitor," rather than as a friend or foe, Trump said he will discuss a variety of issues with the Russian president when they sit down in Helsinki on Monday, including Russia's interference in American elections.

Trump has said in the past that he believes Putin's denial of election meddling and predicted Putin wouldn't change his tune.

"He may deny it," Trump said. "All I can do is say, ‘Did you, and don’t do it again.’ But he may deny.”

On an issue of more immediate importance to Eastern European members of NATO, Trump showed no sign that he would seek to punish Putin for the annexation of Crimea.

"I’m not happy about Crimea," Trump said. But he noted the investments Russia has made in the region and said he is unsure how the situation will turn out.

In an interview published later Thursday, he did turn sharply critical of a world leader he was about to meet one-on-one: British Prime Minister Theresa May. Trump told The Sun newspaper that the sort of "soft" Brexit advocated by May, would rule out the sort of free trade agreement with the U.S. that many in the U.K. had been counting on to cushion the economic impact of the move. "It will probably kill the deal," he said.

He also said he had unsuccessfully tried to advise May on Brexit negotiations. "I would have done it much differently," Trump told The Sun. "I actually told Theresa May how to do it, but she didn't listen to me."