Riot police detain a demonstrator during an unauthorized protest ahead of the NATO summit in Ankara, Turkiye, on Tuesday. EFEKAN AKYUZ/REUTERS

NATO's European leaders sought to win US President Donald Trump's renewed commitment to the alliance at a summit in Turkiye on Wednesday, after he strongly criticized European allies as "disappointing" for their stance in the Iran war.

On his arrival in the Turkish capital Ankara on Tuesday evening, Trump lashed out at allies for failing to back the US over Iran, saying he might have boycotted the meeting had it not been for his friendship with the host, Turkish President Recep Tayyip Erdogan.

"I was very disappointed with NATO," Trump said, singling out the United Kingdom, France, Spain, Germany and Italy for not doing enough to support the strikes on Iran.

He added that "we weren't treated well" by the allies, even as he reiterated that he did not want or need their help.