The billionaire leader used the highest possible profile platform of his first NATO summit in Brussels to accuse members of the alliance of owing "massive amounts of money”.
Unveiling a memorial to the 9/11 attacks at NATO's new headquarters on Thursday, Trump also urged the alliance to get tougher on tackling terrorism and immigration in the wake of the Manchester attack.
Allies who had hoped to hear Trump publicly declare his commitment to NATO's Article 5 collective defence guarantee were left disappointed as he made no mention of it and instead castigated them on their home turf.
"Twenty-three of the 28 member nations are still not paying what they should be paying and what they're supposed to be paying for their defence," the president said as fellow leaders looked on grim faced.
Trump said that even if they met the commitment they made in 2014 to allocate two percent of GDP to defence, it would still not be enough to meet the challenges NATO faces.
"This is not fair to the people and taxpayers of the United States. Many of these nations owe massive amounts of money from past years," Trump added.
The diatribe stirred memories of his campaign trail comments branding NATO "obsolete" and threatening that states that did not pay their way would not necessarily be defended, which deeply alarmed allies.
NATO chief Jens Stoltenberg was repeatedly asked at a closing news conference about Trump's comments but insisted that while the president might have been "blunt" his message was unchanged -- the allies had to do more.
In dedicating the 9/11 Article 5 memorial, the president was "sending a strong signal" of his commitment to NATO, Stoltenberg said.
"And it is not possible to be committed to NATO without being committed to Article 5”.
Trump said the bombing of a pop concert in the British city of Manchester on Monday, claimed by the Islamic State group, showed that "terrorism must be stopped in its tracks”.
"The NATO of the future must include a great focus on terrorism and immigration as well as threats from Russia and NATO's eastern and southern borders," the president said.
The surprising focus on immigration echoed another key feature of Trump's campaign, which included a vow to build a border wall with Mexico, a measure derided in Europe.
German Chancellor Angela Merkel struck an entirely different note as she unveiled a memorial made up of a section of the Berlin Wall to mark the end of the Cold War.
"Germany will not forget the contribution NATO made in order to reunify our country. This is why we will indeed make our contribution to security and solidarity in the common alliance," she said.
Trump's rebuke came despite NATO saying it would formally join the US-led coalition against IS at the summit, despite reservations in France and Germany about getting involved in another conflict.