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.
On a collision course
Analysis by Jonathan Marcus, BBC defence and diplomatic correspondent
With a stroke of his pen President Trump has jeopardised the one agreement – good or bad -that seeks to constrain Iran’s nuclear ambitions.
He launched a scathing assault on the deal and its deficiencies, but he offered no alternative policy to put in its place.
He has put US diplomacy on a collision course with some of Washington’s closest allies.
And some fear that he may have brought a new and catastrophic regional war in the Middle East that much closer.
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).