President Trump called a nuclear deal negotiated by the Obama administration with Iran “an embarrassment” and said he may withdraw from the accord while blasting Tehran for spreading violence in the Middle East during a speech Tuesday at the United Nations.

“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,” he told the world leaders gathered at the General Assembly in his first formal address to the global organization.

The president also suggested that his administration might withdraw from the 2015 deal brokered by former President Barack Obama over Iran’s nuclear program, calling it “one of the worst and most one-sided transactions.”

“That deal is an embarrassment to the US and I don’t think you’ve heard the last of it, believe me,” Trump said of the agreement that comes up for recertification in mid-October.

Iranian President Hassan Rouhani said a US withdrawal from the agreement would damage America’s credibility around the world.

“The exiting of the United States from such an agreement would carry a high cost, meaning that subsequent to such an action by the United States of America, no one will trust America again,” he told told NBC News’ Lester Holt in an interview set to air later Tuesday.

Trump also said Iran was a “murderous regime” that sows mayhem in the Middle East and vows “death to the United States.”

He also blasted Tehran for using its oil profits to fund the terror group Hezbollah that kills “innocent Muslims and attack[s] their peaceful Arab and Israeli neighbors,” for undermining peace in the Middle East and for propping up the government of Syria’s Bashar al-Assad.

He urged the 193 member states of the UN to join together to demand Iran “end its pursuit of death and destruction.”

“It is far past time for the nations of the world to confront another reckless regime, one that speaks openly of mass murder, vowing ‘death to America,’ destruction to Israel, and ruin to many nations and leaders in this room,” Trump said, accusing the country of hiding behind a “false guise of a democracy.”