The historic nuclear accord between Iran and major powers entered into force Saturday as the UN confirmed that Tehran has shrunk its atomic programme and as painful sanctions were lifted on the Islamic republic.
Iran's President Hassan Rouhani, whose 2013 election helped launch the Herculean diplomatic effort towards the July 14 Vienna deal, said it was a "glorious victory" for the "patient nation of Iran."
"I thank God for this blessing & bow to the greatness of the patient nation of Iran." Rouhani said on his official Twitter account.
The International Atomic Energy Agency said its "inspectors on the ground verified that Iran has carried out all measures" agreed under the 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 programme are lifted".
"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," Mogherini said in Vienna in a joint statement with Iranian Foreign Minister Mohammad Javad Zarif.
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.
"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.
In what was hailed as a momentous diplomatic breakthrough, the Vienna agreement was nailed down after two years of rollercoaster negotiations following the moderate Rouhani's June 2013 election.
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 five detainees to be freed by Iran included Washington Post correspondent Jason Rezaian and Saeed Abedini, a pastor from Idaho, a senior US official said Saturday.
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.
"Even after signing the nuclear deal, Iran has not relinquished its ambition to obtain nuclear weapons, and continues to act to destabilise the Middle East and spread terror throughout the world while violating its international commitments," Israeli Prime Minister Benjamin Netanyahu said Saturday.
"Today, the Obama administration will begin lifting economic sanctions on the world's leading state sponsor of terrorism," Republican House Speaker Paul Ryan said.
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 deal has more than a decade to run, which is likely to be a bumpy road, experts say, not least if more hardline governments take power in Tehran or Washington.
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.