President Hassan Rouhani said he would keep enriched uranium stocks in the country rather than sell them abroad.
He also threatened to resume production of uranium enriched to a higher level in 60 days.
The accord was aimed at curbing Iran's nuclear ambitions in return for sanctions relief. Iran-US tensions have risen since Washington quit.
Iran's economy has since been hit by renewed US sanctions.
Iran informed the remaining parties to the deal - France, Germany, Russia, China and the UK - of its decision on Wednesday morning.
Foreign Minister Javad Zarif said Iran was acting within its rights under the deal and it was up to the three European powers to act.
In response, French Defence Minister Florence Parly told French media that the European powers were doing everything they could to keep the deal alive but there would be consequences and possibly sanctions if the deal was not adhered to.
China and Russia both blamed Washington's withdrawal from the deal for the current situation.
Under the deal Iran is required to sell its surplus enriched uranium abroad, rather than keep it.
This is important as the material, which is a by-product of Iran's civilian nuclear power generation, can be used in the manufacture of nuclear weapons.
By selling it abroad, Iran can continue to generate nuclear power and the parties to the agreement can be sure it is not building nuclear weapons.
Iran's announcement comes after US Secretary of State Mike Pompeo made an unscheduled visit to Iraq, and a US aircraft carrier was deployed to the Gulf region.
US officials have reported threats to US forces and their allies from Iran, but have given few details about the exact nature of the threat.
More about: Iran