WASHINGTON—The U.S. is exiting the Iranian nuclear accord, President Donald Trump said Tuesday, dismantling his predecessor’s most prominent foreign-policy initiative and bucking the appeals of some of America’s closest allies.

Speaking in the Diplomatic Room of the White House, Mr. Trump delivered harsh words about the 2015 deal to curb and monitor Iran’s nuclear activity, calling it “horrible,” “one-sided” and “disastrous.” The president said he planned to institute sanctions against Iran, and said the U.S. would sanction...