US President Donald Trump says he will withdraw the US from an Obama-era nuclear agreement with Iran.
Calling it "decaying and rotten", he said the deal was "an embarrassment" to him "as a citizen".
Going against advice from European allies, he said he would reimpose economic sanctions that were waived when the deal was signed in 2015.
In response, Iran said it was preparing to restart uranium enrichment, key for making both nuclear energy and weapons.
Iran's President Hassan Rouhani said: "The US has announced that it doesn't respect its commitments.
"I have ordered the Atomic Energy Organisation of Iran to be ready for action if needed, so that if necessary we can resume our enrichment on an industrial level without any limitations."
He said he would "wait a few weeks" to speak to allies and the other signatories to the nuclear deal first.
"If we achieve the deal's goals in cooperation with other members of the deal, it will remain in place," he said.
The so-called Joint Comprehensive Plan of Action (JCPOA) curbed Iran's nuclear activities in return for the lifting of sanctions that had been imposed by the UN, US and EU.
Mr Trump had previously complained that the deal only limited Iran's nuclear activities for a fixed period; had failed to stop the development of ballistic missiles; and had handed Iran a $100bn (£74bn) windfall that it used "as a slush fund for weapons, terror, and oppression" across the Middle East.
"It is clear to me that we cannot prevent an Iranian nuclear bomb under the decaying and rotten structure of this deal," Mr Trump said.
"The Iran deal is defective to its core."
Former President Barack Obama, who signed the deal on behalf of the US three years ago, called Mr Trump's announcement "misguided".
When will the sanctions restart?
The US Treasury said economic sanctions would not be reimposed on Iran immediately, but would be subject to 90-day and 180-day wind-down periods.
In a statement on its website, it said sanctions would be reimposed on the industries mentioned in the 2015 deal, including Iran's oil sector, aircraft exports, precious metals trade, and Iranian government attempts to buy US dollar banknotes.
US National Security Advisor John Bolton is reported as saying that European companies doing business with Iran will have to finish within six months or face US sanctions.
What reaction has there been worldwide?
France, Germany and the UK - whose leaders had tried to change Mr Trump's mind - have said they "regret" the American decision. The foreign ministry of Russia, another signatory, said it was "deeply disappointed".
The European Union's top diplomat, Federica Mogherini, said the EU was "determined to preserve" the deal.
Former President Obama said on Facebook that the deal was working and was in US interests.
"Walking away from the JCPOA turns our back on America's closest allies, and an agreement that our country's leading diplomats, scientists, and intelligence professionals negotiated.
"At a time when we are all rooting for diplomacy with North Korea to succeed, walking away from the JCPOA risks losing a deal that accomplishes - with Iran - the very outcome that we are pursuing with the North Koreans," he said.
The United Nations secretary general's spokesman said Antonio Guterres was "deeply concerned" at the announcement and called on the other signatories to abide by their commitments.
But Israel's Prime Minister Benjamin Netanyahu says he "fully supports" Mr Trump's "bold" withdrawal from a "disastrous" deal.
And Saudi Arabia, Iran's regional rival, says it "supports and welcomes" Mr Trump's moves towards pulling out of the deal.
What was agreed under the deal?
The so-called Joint Comprehensive Plan of Action (JCPOA) saw Iran agree to limit the size of its stockpile of enriched uranium - which is used to make reactor fuel, but also nuclear weapons - for 15 years and the number of centrifuges installed to enrich uranium for 10 years.
Iran also agreed to modify a heavy water facility so it could not produce plutonium suitable for a bomb.
In return, sanctions imposed by the UN, US and EU that had crippled Iran's economy were lifted.
The deal was agreed between Iran and the five permanent members of the UN Security Council - the US, UK, France, China and Russia - plus Germany.
Iran insists its nuclear programme is entirely peaceful, and its compliance with the deal has been verified by the International Atomic Energy Agency (IAEA).
Source: BBC