(Updated Sunday am)

America and Europe have lifted sanctions against Iran after the United Nations nuclear agency confirmed that the Islamic republic had met all its commitments under a breakthrough deal.

The move crowns years of US-led efforts to curb Iran's ability to make atomic weapons and for Iran, it lifts Western economic sanctions that have been in place for years, unlocking access to $100 billion in frozen assets and unleashing new opportunities for its battered economy.

US secretary of state John Kerry and top diplomats in Iran and the European Union hailed the accord, reached after years of setbacks and a decade after the start of international diplomacy aimed at reducing the possibility that Tehran could turn its nuclear programmes to weapons making.

"Today marks the first day of a safer world," Mr Kerry declared in Vienna, Austria. "This evening we are really reminded once again of diplomacy's power to tackle significant challenges."

Mr Kerry also linked the trust built between Iran and the United States over the past two years of talks to the release by Iran on Saturday of four Americans who also hold Iranian nationality.

"Thanks to years of hard work and committed dialogue," he said, "we have made vital breakthroughs related to both the nuclear negotiations and a separate long-term diplomatic effort" that led to the freeing of the Americans.

EU foreign policy chief Federica Mogherini said in a statement also read in Farsi by Iranian foreign minister Mohammad Jawad Zarif, that the accord "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".

In Washington, US president Barack Obama signed executive orders lifting economic sanctions on Iran, while Mr Kerry confirmed that the UN's International Atomic Energy Agency could verify that "Iran has fully implemented its required commitments".

The July 14 deal, struck after decades of hostility, defused the likelihood of US or Israeli military action against Iran while creating an opening for future co-operation on calming the tumultuous Middle East. But proof that it had been fully implemented had been lacking until Saturday.

But Israeli prime minister Benjamin Netanyahu warned that Iran had not given up its nuclear ambitions and urged world powers to respond harshly to any violations of the deal.

Without that, "Iran will think it can continue to develop a nuclear weapon, destabilise the region and spread terror", a statement by his office said.

For Tehran, the report translates into a huge financial windfall while also helping its efforts at international image rehabilitation.

Beyond sanctions lifting and the unlocking of frozen assets, certification by the IAEA opens the path to new oil, trade and financial opportunities that could prove far more valuable for Tehran in the long run.

Not even waiting for the IAEA report, Iranian transport minister Abbas Akhondi said his country had reached a deal with the European consortium Airbus to buy 114 passenger planes once the sanctions were lifted.

As diplomatic manoeuvring on the nuclear issue dragged on, another source of US-Iranian tension moved towards resolution with both nations announcing the prisoner releases. The four Americans imprisoned in Iran were exchanged for seven Iranians held or charged in the United States.

US officials said the four - Washington Post reporter Jason Rezaian, former US Marine Amir Hekmati, pastor Saeed Abedini and Nosratollah Khosravi-Roodsari - were to be flown from Iran to Switzerland on a Swiss plane and then brought to a US military hospital in Landstuhl, Germany, for medical treatment.

In return, America will either pardon or drop charges against seven Iranians - six of them dual citizens - accused or convicted of breaking US sanctions. The US will also drop Interpol "red notices" - essentially arrest warrants - on a handful of Iranian fugitives.

US officials said a fifth American detained in Iran, a student identified as Matthew Trevithick, had been released in a move unrelated to the prisoner swap and was on his way home.

Among the sanctions lifted will be those imposed between 2006 and 2010 by the UN Security Council as it attempted to pressure Iran to curb uranium enrichment and other activities that could also be used for nuclear weapons.

Iran sees that move and the recent closure of a decade-long investigation of whether it worked on such weapons as a formal end to the allegations against it.

But the deal is also a boon for the White House. Mr Obama's greatest foreign policy triumph has turned tensions into a first step towards co-operation with Iran, a major regional power instrumental for ending the Syrian conflict and other Middle East crises.

The July 14 deal with six world powers puts Iran's various nuclear activities under IAEA watch for up to 15 years, with an option to re-impose sanctions should Tehran break its commitments.

It aims to increase the time Iran would need to make enough fissile material for a nuclear weapon from several months to a year, primarily by capping Tehran's ability to enrich uranium, which can create material ranging from reactor fuel to warhead material.

Under the deal, Iran committed to reduce its operating centrifuges enriching uranium by two-thirds, to just over 5,000 machines.

In Tehran there was no repeat of last July's boisterous street celebrations following agreement on the accord, but social media sites were abuzz.

"Hello to life without sanctions," said one message. Another praised both Mr Zarif and Iranian president Hassan Rouhani, whose taking office in 2013 led to the start of serious negotiations after years of essential deadlock. "Thank you Rouhani," one said. "Thank you Zarif."

President Rouhani said the official implementation of the deal had satisfied all parties except extremists.

Speaking in parliament in comments broadcast live on state television, he said: "In (implementing) the deal, all are happy except Zionists, warmongers, sowers of discord among Islamic nations and extremists in the US. The rest are happy."

Mr Rouhani said the deal "opened new windows for engagement with the world".

He sent out a celebratory tweet calling it a "glorious victory" while the speeches in Vienna were still taking place.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.