His comment and Rouhani's, came just hours before Secretary of State Rex Tillerson and Iranian Foreign Minister Mohammad Javad Zarif were to attend a European Union-hosted meeting about the agreement at the United Nations.
Washington repeatedly criticized the deal.
The president's address to the U.N. General Assembly was so ideal it nearly made me forget all the awful speeches his predecessor gave to that corrupt, bloated and anti-American body.
Iran rejects that it has broken the agreement, and a United Nations report this month pointed to no Iranian violations.
He reiterated that the exit of the U.S. 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. Bremmer said the reason there might be a delay in announcing Mr. Trump's decision is because the administration is "working out what they call the modalities of that now". "This is an agreement that prevented a nuclear program and potentially prevented a military intervention", Mogherini said.
The rhetorical threats have anxious the other countries in the agreement: Britain, China, France, Germany and Russian Federation.
What are the different sides saying?
"Fake empathy for Iranians fools no one", Zarif responded.
"It was a good opportunity to meet, shake hands".
While Tillerson said that Iran is in "technical compliance" with the deal, he also said the U.S. still finds "significant issues with the agreement".
If, as now appears increasingly likely, he decides that it is not, it could open the way for renewed USA sanctions and perhaps the collapse of the agreement.
When President Obama was negotiating the nuclear deal with Iran and other world powers, he assured critics that it was the only way to curb the nuclear threat from Iran.
Tillerson said after his meeting with Lavrov that Trump "really wants to re-do that deal", and is lobbying European and other allies to support this.
The meeting followed an announcement from Trump that he had made a decision on whether the U.S. would re-certify Iran's compliance with the nuclear agreement. "We definitely [do] not need to go into a second one", European Union foreign policy chief Federica Mogherini said, referring to the North Korea nuclear standoff.
The U.S. would face significant criticism, both within the country and from the other nations that negotiated the initial deal, in any attempt to pull out, Rouhani told reporters at a news conference here Wednesday.
He said it would be a "great pity" if it were destroyed by Mr Trump, who he referred to as a "rogue newcomer to worldwide politics".
The letter asked the administration to provide a written report and, where appropriate, public testimony to Senate committees, before October 6, if it is aware of any information suggesting Iran is not complying or that would lead Trump to conclude that the continued suspension of sanctions is not in the USA national security interest. He spoke about scrapping the nuclear deal during the election campaign and has mentioned it on several occasions since.
But even he insisted that the core deal not be dumped and the Joint Comprehensive Plan of Action that the deal signatories implemented a year ago must stay in place.