President Trump scolded stunned NATO members on Thursday, saying they must “pay what they owe” to support the global alliance because “it is not fair to the taxpayers of the United States.”

“In facing our common challenges, we must also ensure that NATO members meet their financial obligations and pay what they owe. Many have not been doing that,” Trump told the assembled leaders at the organization’s new headquarters in Brussels.

“If NATO countries made their full and complete contributions, then NATO would be even stronger than it is today​, especially from the threat of terrorism,” he said. ​

During his spirited and pointed remarks, ​​the gathered NATO leaders — including German Chancellor Angela Merkel and newly elected French President Emmanuel Macron — gave each other sidelong glances and remained standing by in awkward silence.

Canadian Prime Minister Justin Trudeau, who has been critical of Trump’s lectures about NATO in the past, stared straight ahead.

Trump, who during the presidential campaign called NATO “obsolete,” urged the countries to pay their own way by increasing their defense spending to 2 percent of their gross domestic product, saying it “is not fair to the taxpayers of the United States.”

Twenty-three of the 28 members are not paying what they should, he said, and many owe “massive amounts of money from past years.”

“Over ​the ​last ​eight​ years​, the US spent more on ​defense​​ than all other ​NATO cou​ntries combined,” Trump said. “If all NATO members had spent just 2 percent of their GDP on defense last year, we would have had another $119 billion for our collective defense​​​ and for the financing of additional NATO reserves.”

He even took a shot at NATO for its state-of-the-art, billion-dollar headquarters.

“I never asked once what the new NATO headquarters cost. I refuse to do that, but it is beautiful​,” he said.​

But the terror bombing in Manchester, England, on Monday evening that killed 22 people was a stark reminder of the continued global threat at the gathering, where a chunk of the Berlin Wall and a twisted piece of metal from the north tower of the World Trade Center were unveiled.

​Many had wanted Trump to use the occasion to show his commitment to Article 5, or mutual assistance, of the NATO alliance, but he only mentioned it in passing in connection to the war in Afghanistan. The principle was only activated once, after 9/11.

“That is why a strong NATO is good for Europe and good for North America,” he said.

White House spokesman Sean Spicer, asked why Trump didn’t address the issue specifically, said the president is “fully committed.”

“If you are standing at a ceremony talking about the invocation of Article 5 after 9/11 and talking about that, that is a pretty clear indication of the support that exists for it,” Spicer said.

After calling for a moment of silence for the victims of the Manchester attack, Trump reiterated his call to drive the terrorists out “and never let them back in.”

“Terrorism must be stopped or … the horror you saw in Manchester and so many other places will continue forever,”​ he said.​