New York: US President Donald Trump has attacked "unelected, unaccountable" global bureaucrats who want to undermine American sovereignty in a speech to the United Nations General Assembly, while also threatening to cut foreign aid to countries who aren't friendly to the US.

Trump's speech, in which he attacked Iran for promoting "death and destruction" in the Middle East, sparked a war of words with the Iranian president, who suggested in a later speech that Trump exhibited a "Nazi disposition".

The speech carried many of the same "America First" themes Trump outlined in an address to the UN last year but was in one way starkly different: warnings that the US would "totally destroy" North Korea were replaced by praise for North Korean leader Kim Jong-un, whom Trump previously called "rocket man".

Trump appeared taken aback at the start of his speech when he declared he had made more progress in two years than "almost any other administration in the history of our country" - a claim that prompted audible murmurs and laughter from the foreign leaders and diplomats in the room.