Iran nuclear deal: Key details
In 2015, Iran agreed a long-term deal on its nuclear programme with the P5+1 group of world powers - the US, UK, France, China, Russia and Germany.
It came after years of tension over Iran's alleged efforts to develop a nuclear weapon. Iran insisted that its nuclear programme was entirely peaceful, but the international community did not believe that.
Under the accord, Iran agreed to limit its sensitive nuclear activities and allow in international inspectors in return for the lifting of crippling economic sanctions.
Here are the commitments set out in the Joint Comprehensive Plan of Action.
Enriched uranium is used to make reactor fuel, but also nuclear weapons.
Iran had two facilities - Natanz and Fordo - where uranium hexafluoride gas was fed into centrifuges to separate out the most fissile isotope, U-235.
Low-enriched uranium, which has a 3%-4% concentration of U-235, can be used to produce fuel for nuclear power plants. "Weapons-grade" uranium is 90% enriched.
In July 2015, Iran had almost 20,000 centrifuges. Under the JCPOA, it was limited to installing no more than 5,060 of the oldest and least efficient centrifuges at Natanz until 2026 - 15 years after the deal's "implementation day" in January 2016.
Iran's uranium stockpile was reduced by 98% to 300kg (660lbs), a figure that must not be exceeded until 2031. It must also keep the stockpile's level of enrichment at 3.67%.
By January 2016, Iran had drastically reduced the number of centrifuges installed at Natanz and Fordo, and shipped tonnes of low-enriched uranium to Russia.
In addition, research and development must take place only at Natanz and be limited until 2024.
No enrichment will be permitted at Fordo until 2031, and the underground facility will be converted into a nuclear, physics and technology centre. The 1,044 centrifuges at the site will produce radioisotopes for use in medicine, agriculture, industry and science.
Iran had been building a heavy-water nuclear facility near the town of Arak. Spent fuel from a heavy-water reactor contains plutonium suitable for a nuclear bomb.
World powers had originally wanted Arak dismantled because of the proliferation risk. Under an interim nuclear deal agreed in 2013, Iran agreed not to commission or fuel the reactor.
Under the JCPOA, Iran said it would redesign the reactor so it could not produce any weapons-grade plutonium, and that all spent fuel would be sent out of the country as long as the modified reactor exists.
Iran will not be permitted to build additional heavy-water reactors or accumulate any excess heavy water until 2031.
At the time of the agreement, then-US President Barack Obama's administration expressed confidence that the JCPOA would prevent Iran from building a nuclear programme in secret. Iran, it said, had committed to "extraordinary and robust monitoring, verification, and inspection".
Inspectors from the International Atomic Energy Agency (IAEA), the global nuclear watchdog, continuously monitor Iran's declared nuclear sites and also verify that no fissile material is moved covertly to a secret location to build a bomb.
Iran also agreed to implement the Additional Protocol to their IAEA Safeguards Agreement, which allows inspectors to access any site anywhere in the country they deem suspicious.
Until 2031, Iran will have 24 days to comply with any IAEA access request. If it refuses, an eight-member Joint Commission - including Iran - will rule on the issue. It can decide on punitive steps, including the reimposition of sanctions. A majority vote by the commission suffices.
Before July 2015, Iran had a large stockpile of enriched uranium and almost 20,000 centrifuges, enough to create eight to 10 bombs, according to the Obama administration.
US experts estimated then that if Iran had decided to rush to make a bomb, it would take two to three months until it had enough 90%-enriched uranium to build a nuclear weapon - the so-called "break-out time".
The Obama administration said the JCPOA would remove the key elements Iran would need to create a bomb and increase its break-out time to one year or more.
Iran also agreed not to engage in activities, including research and development, which could contribute to the development of a nuclear bomb.
In December 2015, the IAEA's board of governors voted to end its decade-long investigation into the possible military dimensions of Iran's nuclear programme.
The agency's director-general, Yukiya Amano, said the report concluded that until 2003 Iran had conducted "a co-ordinated effort" on "a range of activities relevant to the development of a nuclear explosive device". Iran continued with some activities until 2009, but after that there were "no credible indications" of weapons development, he added.
Sanctions previously imposed by the UN, US and EU in an attempt to force Iran to halt uranium enrichment crippled its economy, costing the country more than $160bn (£118bn) in oil revenue from 2012 to 2016 alone.
Under the deal, Iran gained access to more than $100bn in assets frozen overseas, and was able to resume selling oil on international markets and using the global financial system for trade.
Should Iran violate any aspect of the deal, the UN sanctions will automatically "snap back" into place for 10 years, with the possibility of a five-year extension.
If the Joint Commission cannot resolve a dispute, it will be referred to the UN Security Council.
Iran also agreed to the continuation of the UN arms embargo on the country for up to five years, although it could end earlier if the IAEA is satisfied that its nuclear programme is entirely peaceful. A UN ban on the import of ballistic missile technology will also remain in place for up to eight years.