The 2015 nuclear accord, reached after months of painstaking negotiations with the U.S., Britain, France, Germany, China and Russian Federation, lifted global sanctions in exchange for Iran limiting its nuclear program.
"The Trump regime's hostile action [against Larijani] crossed all red lines of conduct in the worldwide community and is a violation of global law and will surely be answered by a serious reaction from the Islamic Republic", Iran's Foreign Ministry statement read.
Trump has argued behind the scenes that the nuclear deal makes the United States look weak, a senior U.S. official said.
Trump's stance on the accord "amounts to desperate attempts to undermine a solid multilateral agreement", he added. JCPOA is not renegotiable: "rather than repeating exhausted rhetoric, United States must bring itself into full compliance-just like Iran", he wrote.
Ryabkov said the USA withdrawal from the deal would damage other global agreements.
Trump made the threat Friday as he extended waivers of key economic sanctions on Iran, keeping the accord alive at least for now. The two sides exchanged opinions on a statement regarding the Iran nuclear deal made by the US, Xinhua news agency reported.
This would not entail negotiations with Iran but would be the result of talks with European allies, the official said.
Hard-liners on Iran in the US Congress have called for the reimposition of the suspended sanctions and an end to the nuclear deal, while some liberal Democrats want to pass legislation that would make it harder for Trump to pull Washington out without congressional consent.
A decision to withhold a waiver would have effectively ended the deal between Iran and the other worldwide signatories.
While there may be some relief that Trump has yet to torpedo the hard-won accord, there were clear signs of frustration from European capitals in the runup to the decision.
The statement from his ministry further criticised new sanctions on 14 individuals announced by the US Treasury on Friday over human rights issues and Iran's missile programme.
The EU said in a statement it had taken note of Trump's decision and would assess its implications.
"We are gradually coming to the conclusion that an internal decision by the USA to leave the (Joint Comprehensive Plan of Action) has already been made or is close to being made", Ryabkov said in an interview with Interfax news agency. "It also will not allow the JCPOA to be linked to any other issue", it said.