Iran has suspended commitments under the 2015 international nuclear deal, a year after it was abandoned by the US.
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 more-highly-enriched uranium in 60 days if other signatories did not act to protect Iran from US sanctions.
The 2015 accord was aimed at curbing Iran's nuclear ambitions in return for relief from sanctions.
But since the US left the deal it has imposed new sanctions, hitting Iran's economy and raising Iran-US tensions.
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.
On May 8 2018, US withdrew from #JCPOA, violated #UNSCR 2231 & pressured others—incl #E3—to do the same— Javad Zarif (@JZarif) May 8, 2019
After a year of patience, Iran stops measures that US has made impossible to continue
Our action is within the terms of JCPOA.
EU/E3+2 has a narrowing window to reverse this.
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.
What did President Rouhani say?
Mr Rouhani said he was suspending two parts of the deal, which is known as the Joint Comprehensive Plan of Action (JCPOA), that Iran was adhering to - the sale of surplus enriched uranium and heavy water.
He then gave the European powers, Russia and China 60 days to meet their financial and oil commitments to the deal. If they did so, Iran would resume the sales.
If, however, those commitments were not met and the powers chose to follow US sanctions, he said Iran would begin higher enrichment of uranium, which is currently capped, and begin developing its Arak heavy water reactor based on plans made prior to the deal.
But Iran's president added: "We do not want to leave the agreement. All the people of the world should know that today is not the end of the JCPOA; it is a new step within the framework of the JCPOA."
However, he said the five powers would face a "very decisive reaction" if Iran's nuclear case was referred to the UN Security Council.
What has the reaction been?
Russian Foreign Minister Sergei Lavrov quickly urged all of the remaining parties to the deal to fulfil their obligations.
Both Russia and China have blamed Washington's withdrawal from the deal for the current situation.
A spokesman for UK PM Theresa May said the deal was "crucial" and that Britain would ensure it remained in place as long as Iran upheld its commitments.
Foreign Office minister Mark Field told parliament Iran's move was an "unwelcome step".
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.
Germany remained "fully committed" to its pledges on the deal if Iran reciprocated, a German foreign ministry spokesman said.
Huge dilemma for Europeans
Iran is seeking to strike a difficult balance: pushing back against some of the restrictions imposed by the JCPOA, while not doing so much as to withdraw from it altogether.
This is an alarm signal but also a warning. Iran is facing growing pain from re-imposed US sanctions.
It wants the Europeans to take urgent practical steps to provide some relief. And if relief does not come, then Iran may well have to re-consider its overall adherence to the JCPOA - which the US abandoned a year ago.
This presents the Europeans with a huge dilemma. They are caught between the Iranians and the Trump administration. Can they continue to back the agreement if Iran is not fully complying with its terms?
The US is likely to insist that there can be no middle way. Iran is either honouring the terms of the JCPOA or it is not.
What is the Europeans' role in all this?
In January, the UK, Germany and France set up a new payments mechanism to allow businesses to trade with Iran without being subject to sanctions.
The three countries opposed last year's decision by President Donald Trump to abandon the deal.
The system, known as Instex, is supposed to focus on "legitimate trade" in goods "where the immediate need of the Iranian people is greatest", for example food, pharmaceutical products and consumer goods not subject to sanctions.
Oil, Iran's main source of foreign exchange, is at the moment not covered, and it is thought so far that the payment system has done little to soften the impact of sanctions.
Iran now wants the Europeans to give the system more bite.
Why is the nuclear deal in crisis?
The landmark nuclear deal was thrown into flux when President Trump announced the US withdrawal one year ago.
The value of Iran's currency has since been pushed to record lows, its annual inflation rate quadrupled and foreign investment driven away.
Despite this, Iran has upheld its commitments to the deal, according to inspectors from the International Atomic Energy Agency (IAEA).
Why is there such hostility between the US and Iran?
Tensions between the US and Iran can be traced back to Iran's Islamic Revolution in 1979, which overthrew the pro-Western Shah and established a radical anti-US regime in its place.
President Trump has taken a particularly hard line towards Iran since he took office in 2016.
His administration wants to renegotiate the nuclear deal and widen its scope so that it also curbs Iran's ballistic missile programme and "malign" activities in the Middle East.
The US has recently raised the pressure on Iran, with two significant moves in April:
- It ended exemptions from sanctions for five of Iran's main customers still buying oil, including China, India and Turkey
- It blacklisted Iran's elite Islamic Revolution Guard Corps, designating it a foreign terrorist group
And earlier this week, National Security Adviser John Bolton said the US was deploying an aircraft carrier to the Middle East following a number of "troubling and escalatory indications and warnings" from Iran.