President Donald Trump warned Tuesday that the United States is ready to "totally destroy" North Korea and vowed to confront Iran's "murderous regime" over its weapons program.

In his first address to leaders gathered at the United Nations General Assembly, Trump warned North Korea not to pursue its nuclear missile program in his starkest language yet, deriding its young leader Kim Jong-Un with the nickname "Rocket Man" and threatening to end his country.

"The United States has great strength and patience, but if it is forced to defend itself or its allies, we will have no choice but to totally destroy North Korea.

"Rocket Man is on a suicide mission for himself and for his regime," he said. "The United States is ready, willing and able, but hopefully this will not be necessary."

As to Iran, Trump appeared to pave the way towards tearing up the nuclear deal signed in 2015 between six world powers and Iran.

Trump said the accord had failed to rein in the regime's subversive role in Middle East conflicts, and sent a clear signal that he intends to declare Tehran in breach of the deal when he reports to Congress next month.

"We cannot let a murderous regime continue these destabilizing activities while building dangerous missiles and we cannot abide by an agreement if it provides cover for the eventual construction of a nuclear program," Trump told the assembly.

"Frankly, that deal is an embarrassment to the United States, and I don't think you've heard the last of it," he said.

"Believe me. It is time for the entire world to join us in demanding that Iran's government end its pursuit of death and destruction."

Many of the assembly's members, including US allies and Iran deal signatories France and Britain, favor retaining the accord -- under which Iran surrendered much of its enriched nuclear fuel and exposed its nuclear sites to international monitors.

But some of Trump's closest advisors fear the agreement leaves Iran too close to the threshold of being able to quickly develop a nuclear weapon when restrictive clauses in the deal begin to expire in 2025.