“Necessary directives have been given to related organisations and the Atomic Energy Organization of Iran [to proceed in case of withdrawal],” the president said.
“If America leaves the nuclear accord, this will entail historic regret for it,” Rouhani added.
Trump has repeatedly threatened to end the deal. In January, he announced he is waiving the US sanctions against Iran for the “last time“.
He said, if his demands are not met within 120 days, the US will withdraw from the deal.
The deadline is on May 12, although he hinted that the US could cut loose before that date if he sees no progress in negotiations.
Iran’s Foreign Minister Javad Zarif said on Thursday that his country will not be bullied into renegotiating the multilateral deal that was years in the making.
“Iran stands firm in the face of futile attempts at bullying,” Zarif said in a recorded message.
“If the US continues to violate the agreement, or if it withdraws altogether, we will exercise our right to respond in a manner of our choosing,” he said referring to the Joint Comprehensive Plan of Action (JCPOA), the official name of the agreement.
He also rejected efforts to renegotiate the deal, saying: “We will neither outsource our security, nor will we renegotiate or add on to a deal we have already implemented in good faith.”
Zarif added that the US “will have to accept responsibility” for the consequences of not honouring its commitment to the deal.
Iran’s most senior diplomat issued the statement as Iran’s ambassador to the United Kingdom, Hamid Baeidinejad, said Tehran is “ready to go back to the previous situation” if Washington ditches the deal.
In April, senior Iranian cabinet officials warned that the country could ramp its uranium enrichment to 20 percent on short notice, if the US withdraws from the nuclear agreement.