Iran emerged from years of economic isolation on Saturday when world powers lifted crippling sanctions against the nation in return for Tehran complying with a deal to curb its nuclear ambitions.
In a dramatic move scheduled to coincide with the scrapping of the sanctions, Tehran also announced the release of five Americans including Washington Post reporter Jason Rezaian as part of a prisoner swap with the United States.
Together, the lifting of sanctions and the prisoner deal considerably reduce the hostility between Tehran and Washington that has shaped the Middle East since Iran's Islamic Revolution of 1979.
Tens of billions of dollars worth of Iranian assets will now be unfrozen and global companies that have been barred from doing business there will be able to exploit a market hungry for everything from automobiles to airplane parts.
The U.N. nuclear watchdog ruled on Saturday that Iran had abided by an agreement last year with six world powers to curtail its nuclear program, triggering the end of sanctions.
"Iran has carried out all measures required under the (July deal) to enable Implementation Day (of the deal) to occur," the Vienna-based International Atomic Energy Agency said in a statement.
Within minutes, the United States formally lifted banking, steel, shipping and other sanctions on Iran, a major oil producer which has been virtually shut out of international markets for the past five years.
The European Union also began the process of lifting sanctions and Iran's transport minister said Tehran plans to buy 114 civil aircraft from European aircraft maker Airbus.
The end of sanctions means more money and prestige for Shia Muslim Iran as it becomes deeply embroiled in the sectarian conflicts of the Middle East, notably in the Syrian civil war where its allies are facing Sunni Muslim rebels.
America's thaw with Iran is viewed with deep suspicion by U.S. Republicans as well as American allies in the Middle East, including Israel and Saudi Arabia. U.S.-Iranian suspicion still remains deeply entrenched.
Washington maintains separate, less comprehensive sanctions on Iran over its missile program. For its part, Iran detained 10 U.S. Navy sailors on two boats in the Gulf a week ago, although they were released the next day.
In an unusual move, President Obama pardoned three Iranian-Americans charged for violating sanctions against Iran, a lawyer for one of the men said, while prosecutors moved to drop charges against four Iranians outside the United States.
Iran agreed to free five Americans including Rezaian and Saeed Abedini, an Iranian-American Christian pastor sentenced to eight years in prison in 2013 on charges of undermining Iran's national security.
But a U.S. official said four of the Americans had not yet left Iran due to ongoing logistical issues. The fifth prisoner, Matthew Trevithick, has left the country after 40 days in prison. Trevithick, a student and journalist, had traveled and worked in conflict-torn nations including Syria, Mali and Afghanistan.
The prisoner deal was the culmination of months of diplomatic contacts, secret talks and legal maneuvering which came close to falling apart because of a threat by Washington in December to impose fresh sanctions on Iran for recent ballistic missile tests.
The detente with Iran is opposed by all of the Republican candidates vying to succeed Obama as president in an election in November.
Republican front-runner Donald Trump said at a campaign event that he was happy Americans were being freed, "but I will tell you it’s a disgrace that they were there for so long.”
Ted Cruz, a conservative senator from Texas and one of the leading Republicans, tweeted in support of Abedini's release: "Praise God! Surely bad parts of Obama's latest deal, but prayers of thanksgiving that Pastor Saeed is coming home."
Democratic presidential hopeful Hillary Clinton took credit for helping to start the sanctions pressure on Iran during her 2009-2013 tenure as Obama's secretary of state.
"These are important steps that make the United States, our allies, and the entire world safer. I congratulate President Obama and his team, and I’m proud of the role I played to get this process started," she said in a statement.
Clinton also urged new sanctions on Tehran over its ballistic missile testing program.
Iran's return to an already glutted oil market is one of the factors contributing to a global rout in oil prices, which fell below $30 a barrel this week for the first time in 12 years.
Tehran says it could boost exports by 500,000 barrels per day within weeks.
The end of sanctions marks a crowning achievement for Iranian President Hassan Rouhani, a pragmatic cleric elected in 2013 in a landslide on a promise to reduce Iran's international isolation.
The economic measures, mostly imposed in the last five years, had cut off the country of 80 million people from the global financial system, slashed Iran's exports and imposed severe economic hardship on ordinary Iranians.
Rouhani was granted the authority to negotiate the deal by Supreme Leader Ayatollah Ali Khamenei, an arch-conservative in power since 1989.
Iran denies its nuclear program was aimed at obtaining an atomic bomb.
Rouhani congratulated the Iranian nation on Saturday after the news that sanctions were to be lifted.
"Thank God for this blessing and bow to the greatness of the patient nation of Iran. Congrats on this glorious victory," Rouhani tweeted in English.
Iranian Foreign Minister Javad Zarif has argued, including in a New York Times op-ed column last week, that Iran wants to help the global fight against Sunni Muslim militants like Islamic State and al Qaeda.
"It's now time for all — especially Muslim nations — to join hands and rid the world of violent extremism. Iran is ready," Zarif tweeted on Saturday.