Updated

Iran's president on Sunday blasted what he described as U.S. efforts to impose its trade policies on the world, saying the plans were "illegal" and a “threat to all.”

President Hassan Rouhani's remarks were delivered in the eastern Chinese city of Qingdao, at a summit of the Chinese- and Russian-dominated Shanghai Cooperation Organization.

Rouhani’s sharp critique came a month after President Donald Trump announced that the U.S. would withdraw from the Iran nuclear deal, an Obama-era agreement negotiated by Tehran and world superpowers that guaranteed sanctions relief if Iran eased its nuclear program, Reuters reported.

Trump, who made tearing up the deal a central platform of his 2016 presidential campaign, followed through on that promise May 8 by pulling the U.S. out of the agreement.

“At the point when the United States had maximum leverage, this disastrous deal gave this regime – and it’s a regime of great terror – many billions of dollars, some of it in actual cash – a great embarrassment to me as a citizen and to all citizens of the United States,” Trump said.

Putin/Rouhani

Russian President Vladimir Putin, left, shakes hands with Iranian President Hassan Rouhani during their meeting in Qingdao, China, Saturday, June 9, 2018. (AP Photo/Alexander Zemlianichenko)

The Shanghai Cooperation Organization, a joint-security bloc with China and Russia, is widely viewed as a counterweight to NATO, the Western military alliance.

Rouhani also extended his appreciation to Beijing and Moscow for continuing their support of the nuclear deal. He called Russia’s role “important and constructive.”

The Associated Press contributed to this report.