Nuclear weapons were the focus as global leaders addressed the United Nations General Assembly on Wednesday, a day after President Trump vowed to “totally destroy” North Korea if it threatened the United States or its allies.

Leaders from around the globe began adding their signatures to a treaty that bans nuclear weapons, although the world’s nine nuclear-armed countries declined to sign it and denounced it as dangerously naïve.

President Hassan Rouhani of Iran, responding to Mr. Trump’s denunciation of the Iran nuclear deal as “an embarrassment,” defended the agreement in his own remarks to the General Assembly on Wednesday. Mr. Rouhani said the agreement could be “a new model for global interactions.”

• Sign up for the Morning Briefing for United Nations news and a regular look at what you need to know to begin your day.