By JULIE PACE and JONATHAN LEMIRE, Associated Press

BRUSSELS (AP) — Surrounded by stone-faced allies, President Donald Trump rebuked fellow NATO members Thursday for failing to meet the military alliance's financial benchmarks, asserting that leaves it weaker and shortchanges "the people and taxpayers of the United States."

Trump, who has often complained back home about other nations' NATO support, lectured the other leaders in person this time, declaring, "Many of these nations owe massive amounts of money from past years."

The president's assertion immediately put NATO under new strain and did nothing to quiet questions about his complicated relationship with an alliance he has previously panned as "obsolete." Notably, he also did not offer an explicit public endorsement of NATO's "all for one, one for all" collective defense principle, though White House officials said his mere presence at the meeting signaled his commitment.

Fellow NATO leaders occasionally exchanged awkward looks with each other during the president's lecture, which occurred at an event commemorating the fall of the Berlin Wall and the Sept. 11, 2001, terrorist attacks. When Trump tried to lighten the mood with a joke about NATO's gleaming new home base — "I never asked once what the new NATO Headquarters cost" — there was no laughter from his counterparts.

NATO officials had expected Trump to raise the payments issue during Thursday's meeting, even preparing Secretary-General Jens Stoltenberg for the prospect that the president could try to pull off a stunt like handing out invoices. But one European official said NATO members were still taken aback by the aggressive tone of his speech.

As a presidential candidate, Trump railed against NATO's financial burden-sharing, suggesting the U.S. might only come to the defense of countries that meet the alliance's guidelines — for committing 2 percent of their gross domestic product to military spending. A White House official said the president wanted to deliver the same direct message in front of NATO allies.

Trump's public scolding was all the more remarkable given the fact that he has actually backed away from some of his most provocative comments on foreign policy issues since taking office. He's retracted his vow to label China a currency manipulator and has lavished praise on Chinese President Xi Jinping. During a visit to Saudi Arabia this week, he called Islam one of the world's great religions after declaring during the campaign that "Islam hates us

But few issues appear to have as much staying power with Trump as the uneven financial contributions of NATO members. Last year, only five of the 28 countries met the 2 percent goal: the U.S., Greece, Britain, Estonia and Poland.

During a private dinner Thursday night, the 28 members, plus soon-to-join Montenegro, renewed an old pledge to move toward the 2 percent by 2024 — a move the White House touted as a sign of Trump's influence.

Some of the allies — particularly Eastern European nations deeply worried about Russian aggression — were hopeful that Trump would state a firm commitment to NATO's Article 5 mutual defense agreement, which underpins the entire alliance. Instead, he highlighted NATO's decision to invoke the article for the only time after 9/11 and said the U.S. would "never forsake the friends that stood by our side."

The White House insisted Trump had not intended to leave wiggle room on his commitment to coming to the defense of NATO members.

And Stoltenberg said later that Trump, Vice President Mike Pence and other U.S. officials have stated clearly their assurances. He said, "It's not possible to be committed to NATO without being committed to Article 5."

Trump scored a hoped-for success as NATO joined the 68-nation international coalition fighting the Islamic State group. An anti-terror coordinator may also be named. But most changes will be cosmetic, as NATO as an alliance has no intention of going to war against IS.

Finishing off a long day, Trump arrived late Thursday night in Sicily for meetings Friday with leaders from the Group of 7 wealthy nations. The summit marks Trump's final stop on a maiden international trip that began in Saudi Arabia and Israel, where the president was warmly embraced by the countries' leaders.

His reception has been less enthusiastic in Europe, given his negative campaign comments not only about NATO, but also the European Union. His arrival was also shadowed by new criticism from British Prime Minister Theresa May, who complained about leaks of intelligence to the American media about this week's deadly bombing at a concert in Manchester, England.

May said she planned to "make clear to President Trump that intelligence that is shared between our law enforcement agencies must remain secure." The two were seen talking during an event marking the opening of the new NATO headquarters.

British officials are particularly angry that photos detailing evidence about the bomb used in the Manchester attack were published. In a written statement, Trump called the alleged leaks "deeply troubling" and said he was asking the Justice Department and other agencies to review the matter.

The president opened his day with a meeting with leaders of the European Union, another alliance he criticized during the campaign. Following the talks, European Council president Donald Tusk said he and the U.S. president agreed on a need to combat terrorism but some differences loomed large.

"Some issues remain open, like climate and trade. And I am not 100 percent sure that we can say today — 'we' means Mr. President and myself — that we have a common position, common opinions about Russia," said Tusk. He said unity must be found around values like freedom and human rights and dignity.

Trump had lunch with newly elected French President Emmanuel Macron, who has been critical of the Republican president. As the press watched, the two men exchanged a very firm handshake during their meeting, both men gripping tight, their faces showing the strain.

___

AP writers Lorne Cook and Raf Casert contributed to this report.

___

Follow Julie Pace at http://twitter.com/jpaceDC and Jonathan Lemire at http://twitter.com/jonlemire

___

This story has been corrected to fix the spelling of Emmanuel in the last paragraph.