THE United Nations has confirmed that Tehran has shrunk its atomic program as painful sanctions are lifted on the Islamic republic.

The International Atomic Energy Agency said its “inspectors on the ground verified that Iran has carried out all measures” agreed under the July 14 agreement.

EU foreign policy chief Federica Mogherini, representing the six powers, said that as a result “multilateral and national economic and financial sanctions related to Iran’s nuclear program are lifted”.

“All sides remain firmly convinced that this historic deal is both strong and fair, and that it meets the requirements of all,” Mogherini said in Vienna in a joint statement with Iranian Foreign Minister Mohammad Javad Zarif.

“Today ... the United States, our friends and allies in the Middle East, and the entire world are safer because the threat of the nuclear weapon has been reduced,” US Secretary of State John Kerry said in Vienna.

“This achievement clearly demonstrates that with political will, perseverance, and through multilateral diplomacy, we can solve the most difficult issues and find practical solutions that are effectively implemented,” they said.

The so-called “Implementation Day” for the accord also followed news of a prisoner swap between Iran and the United States in another sign of thawing relations between the two foes since the July 14 agreement.

The steps taken by Iran, combined with ultra-close IAEA inspections, extend to at least a year — from a few months previously — how long Iran would need to make one nuclear bomb’s worth of fissile material.

They include slashing by two-thirds its uranium centrifuges, reducing its stockpile of uranium — enough before the deal for several bombs — and removing the core of the Arak reactor which could have given Iran weapons-grade plutonium.

Iran has always denied wanting nuclear weapons, saying its activities are exclusively for peaceful purposes such as power generation.

In what was hailed as a momentous diplomatic breakthrough, the Vienna agreement was nailed down after two years of rollercoaster negotiations following the June 2013 election of Iranian President Hassan Rouhani.

The highly complex deal drew a line under a standoff dating back to 2002 marked by failed diplomatic initiatives, ever-tighter sanctions, defiant nuclear expansion by Iran and threats of military action.

In addition it put Iran and the United States on the road to better relations some 35 years after the Islamic revolution that toppled the US-backed shah, and at a particularly explosive time in the Middle East.

The four Iranian-American detainees to be freed by Iran included Washington Post correspondent Jason Rezaian and Saeed Abedini, a pastor from Idaho, a senior US official said.

The others were Amir Hekmati and Nosratollah Khosravi-Roodsari, Washington said. A fifth American, identified as Matthew Trevitick, was also to be released as part of a different process.

In exchange Washington said it had granted clemency to seven Iranians, six of whom were dual US-Iranian citizens, and dropped charges against 14 more.

The agreement, heralded as US President Barack Obama’s biggest major foreign policy triumph, has by no means been universally cheered, however.

Obama’s Republican opponents charge that it fails to do enough to ensure Iran will never get the bomb, a complaint shared by Israel, Iran’s arch foe widely assumed to have nuclear weapons itself.

Sunni Saudi Arabia, Iran’s other great regional rival, is also alarmed at the prospect of warmer US-Iran ties and of predominantly Shiite Iran, newly flush with oil revenues, increasing its influence.

Already Saudi Arabia and Iran, fighting a proxy war in Yemen and key players in the Syrian conflict, are at daggers drawn following Saudi Arabia’s execution of a Shiite cleric in early January and the subsequent ransacking of the Saudi embassy in Tehran.

Iran’s imminent return to the oil market has also contributed to the sharp slide in the price of crude to 12-year lows of under $30 per barrel this week, putting Saudi Arabia’s public finances under strain.

The lifting of sanctions on Iran is “going to put 500,000 barrels per day more on the market”, said James Williams of WTRG Economics. Some analysts believe $20 oil is on the horizon.

The deal has more than a decade to run, which is likely to be a bumpy road, experts say, not least if more hard line governments take power in Tehran or Washington.

The two countries are still far from being best friends, as witnessed by Iran’s recent capture of 10 US sailors in Iranian waters, although their improved relations did help ensure their swift release.

Iran violated a UN resolution in October when it test-launched a medium-range missile capable of carrying a nuclear warhead, a UN panel of experts concluded in a report in December.

A “snapback” mechanism ensures that many of the sanctions can be swiftly reimposed, and a special joint commission is meant to handle any misunderstandings.

“Iran may test the boundaries of the agreement,” said Kelsey Davenport of the Arms Control Association.

“At the same time, punitive actions for violations on both sides should be proportionate, and differentiated from technical missteps, which may occur under such a complex agreement,” she told AFP.