European powers say they are committed to the Iran nuclear deal, after President Donald Trump announced the US was withdrawing from the agreement.
The UK, France and Germany urged the US not to obstruct its implementation.
They said they would work with the other signatories to the 2015 deal – Russia and China – which have stressed continuing support for the accord.
In response, Iran said it would restart uranium enrichment, if the agreement could not be salvaged.
In a statement, President Hassan Rouhani said: “I have ordered the foreign ministry to negotiate with the European countries, China and Russia in the coming weeks.
“If we achieve the deal’s goals in co-operation with other members of the deal, it will remain in place.”
There were furious scenes in the Iranian parliament, with members burning an American flag and the speaker reportedly saying Mr Trump lacked “mental capacity”.
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.
Why did the US withdraw?
In a televised address on Tuesday, President Donald Trump said the US would withdraw from the JCPOA. He called it a “horrible, one-sided deal that should have never, ever been made”.
Rather than protecting the US and its allies, he said it had placed “very weak limits on the regime’s nuclear activity and no limits at all on its other malign behaviour, including its sinister activities in Syria, Yemen and other places”.
The president added that the accord did not deal with Iran’s development of ballistic missiles, and that its inspections mechanisms were not strong enough.
He said he would reimpose economic sanctions that were waived when the deal was signed in 2015.
The US Treasury said the sanctions would target industries mentioned in the deal, including Iran’s oil sector, aircraft manufacturers exporting to Iran and Iranian government attempts to buy US dollar banknotes.
US National Security Adviser John Bolton is reported as saying that European companies doing business in Iran will have to stop doing so within six months or face US sanctions.
Analysis by Jonathan Marcus, BBC defence and diplomatic correspondent
The deal was not perfect. It did not cover a range of worrying Iranian activities from its missile programme to its regional behaviour.
The inconvenient truth for Donald Trump is that, as far as it goes, the nuclear deal was working.
Despite this, Mr Trump presented it in stark and frankly erroneous terms – for leaving out things that it was never supposed to cover in the first 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.
How has the world reacted?
Other signatories to the deal have been left aghast. Russia said it was “deeply disappointed” by Mr Trump’s decision.
The French Foreign Minister, Jean-Yves Le Drian, insisted the deal was “not dead” and said there would be a meeting between France, Britain, Germany and Iran on Monday.
Former President Barack Obama – who played a key role in the agreement – said on Facebook that it was working and protected 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,” he said.
But the move has been welcomed by Iran’s major regional rivals, Saudi Arabia and Israel.
Israeli Prime Minister Benjamin Netanyahu, a prominent critic of the accord, said he “fully supports” Mr Trump’s withdrawal from a “disastrous” deal.
What was agreed under the deal?
The 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).