The U.S. and Iranian presidents on Tuesday took their nations’ dispute to the virtual world stage, trading attacks over the 2015 multilateral nuclear deal, the U.S. “maximum pressure” campaign, Iran’s role in regional security and the U.S. killing of a prominent Iranian military commander in January.

The prerecorded remarks played at the United Nations General Assembly came a day after the U.S. unveiled new measures intended to prevent Iran from engaging in weapons trade with China, Russia or nonstate actors, announcing new penalties as part of a “snapback” of U.N. sanctions to which no other nations have said they would adhere.

President Trump listed among what he considers his administration’s foreign-policy accomplishments the 2018 withdrawal from “the terrible Iran nuclear deal” and the imposition of “crippling sanctions” on Tehran. He touted the U.S. military strike that killed Maj. Gen. Qassem Soleimani, commander of Iran’s Islamic Revolutionary Guard Corps’s Quds Force, describing him as “the world’s top terrorist.”

Iranian President Hassan Rouhani dedicated most of his speech to criticizing the U.S., condemning the Trump administration for withdrawing from the nuclear agreement, reimposing economic sanctions on Iran and killing Gen. Soleimani, an “assassinated hero.”

President Trump appears virtually due to the coronavirus pandemic during the 75th annual U.N. General Assembly in New York City on Tuesday.

President Trump appears virtually due to the coronavirus pandemic during the 75th annual U.N. General Assembly in New York City on Tuesday.

Photo: united nations/Reuters

Mr. Rouhani said Iran had taken steps to promote regional peace, pointing to the 2015 nuclear deal with six world powers and its fight against Islamic State extremists in Iraq and Syria. He also touted Iran’s assistance to Syrian President Bashar al-Assad against terrorist and separatist groups, and Tehran’s defense of the Lebanese and Palestinian people against Israel.

“Such a nation does not deserve sanctions,” he said. “The response to peace is not war. The reward for combating extremism is not assassination.”

Mr. Rouhani applauded the Security Council’s recent rejection of a U.S. bid to extend a conventional-arms embargo on Iran, which expires Oct. 18, saying the U.S. found itself “humiliated in such self-created isolation.”

“This is a victory not just for Iran, but for the global community,” Mr. Rouhani said, adding that the U.S. withdrawal from the nuclear deal was an unprecedented move.

“Where can you find precedent for a government to renege, without any reason, on the outcome of 13 years of multilateral talks?” he asked.

World leaders appeared virtually at the United Nations General Assembly Tuesday amidst a global pandemic. WSJ’s William Mauldin looks at the key moments, including concerns over the widening rift between the U.S. and China and the prospect of reimposing Iran sanctions. Photo: UNTV/Associated Press

“Rouhani’s shout out to Russia and China for standing up against the U.S. in the Security Council is a harbinger of things to come,” said Behnam Ben Taleblu, a senior fellow at the Foundation for Defense of Democracies, which supports sanctions against Iran. “Expect more great-power involvement with American adversaries in the coming years.”

In his own remarks, French President Emmanuel Macron suggested the U.S. approach had failed to achieve its stated objective of fundamentally changing Iran’s behavior.

“The strategy of maximum pressure that has been pursued for several years now has not at this stage made it possible to put an end to Iran’s destabilizing activities, nor to ensure that it will not be able to acquire nuclear weapons,” he said. “This is why France…with its German and British partners, will maintain its demand for the full and complete implementation of the Vienna agreement of 2015 and will not accept the violations committed by Iran.”

Mr. Macron went on to say that the issues of Iran’s nuclear path, its regional activities and missile work will need to be addressed “in time.”

Write to Courtney McBride at courtney.mcbride@wsj.com and Sune Engel Rasmussen at sune.rasmussen@wsj.com