Iran and six major world powers reached a landmark nuclear deal on Tuesday, capping more than a decade of negotiations with an agreement that could transform the Middle East.
US President Barack Obama praised the deal as one built on verification, not trust, and said it would help stop the spread of nuclear weapons in the Middle East.
"Every pathway to a nuclear weapon is cut off," Obama said in an address to the nation, with vice president Joe Biden by his side. "This deal demonstrates that American diplomacy can bring real and meaningful change.
Obama hailed a step towards a "more hopeful world", Iran's President Hassan Rouhani said it proved that "constructive engagement works". But Israel said it would do what it could to kill a deal that it called an "historic surrender".
The agreement will now be debated in the US Congress, but Obama said he would veto any measure to block it.
"This deal offers an opportunity to move in a new direction," Obama said. "We should seize it."
Watch | Barack Obama on how the Iran deal can prevent future wars
Under the deal, sanctions imposed by the United States, European Union and United Nations will be lifted in return for Iran agreeing long-term curbs on a nuclear programme that the West has suspected was aimed at creating a nuclear bomb.
The agreement is a momentous political victory for both Obama, who has long promised to reach out to historic enemies, and Rouhani, a pragmatist elected two years ago on a vow to reduce the isolation of his nation of almost 80 million people.
Both leaders face scepticism from powerful hardliners at home, after decades of enmity between nations that referred to each other as "the Great Satan" and a member of the "Axis of Evil".
Rouhani was quick to present the deal as a step on the road towards a wider goal of international cooperation: "With this unnecessary crisis resolved, new horizons emerge with a focus on shared challenges," he tweeted.
For Obama, the diplomacy with Iran, begun in secret more than two years ago, ranks with his normalisation of ties with Cuba as landmarks in a legacy of reconciliation with foes that tormented his predecessors for decades.
"History shows that America must lead not just with our might but with our principles," he said in a televised address. "Today's announcement marks one more chapter in our pursuit of a safer, more helpful and more hopeful world."
While the main negotiations were between the United States and Iran, the four other U.N. Security Council permanent members, Britain, China, France and Russia, are also parties to the deal, as is Germany.
Israeli Prime Minister Benjamin Netanyahu called the deal "a bad mistake of historic proportions".
"Iran will get a jackpot, a cash bonanza of hundreds of billions of dollars, which will enable it to continue to pursue its aggression and terror in the region and in the world," he said. "Iran is going to receive a sure path to nuclear weapons."
His deputy foreign minister, Tzipi Hotovely, called the deal an "historic surrender" and said on Twitter that Israel would "act with all means to try and stop the agreement being ratified", a clear threat to try to use its influence to block it in the Republican-controlled U.S. Congress.
Congress has 60 days for a review, though if it rejects the deal, Obama can use his veto. It would require two-thirds of lawmakers to override such a veto, which means some of Obama's fellow Democrats would have to rebel against one of their president's signature achievements in order to kill the deal.
Republicans lined up against it. Presidential candidate Lindsey Graham, a senator from South Carolina, called it a terrible deal that would make matters worse.
Nor were hardliners silent in Iran: "Celebrating too early can send a bad signal to the enemy," conservative lawmaker Alireza Zakani was quoted as saying in parliament by Fars News agency. Iran's National Security Council would review the accord, "and if they think it is against our national interests, we will not have a deal".
Iran is not likely to receive many of the benefits from the lifting of sanctions for months because of the need to ratify the deal and verify its fulfilment.
But once implementation is confirmed, it will immediately gain access to around $100 billion in frozen assets and to the international financial system, allowing it to resume sales of oil that had been drastically curtailed.
The final round of talks in Vienna involved nearly three weeks of intense negotiation between U.S. Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif.
That would once have been unthinkable for two countries that have barely spoken since 1979, when Iranian revolutionaries stormed the U.S. embassy in Tehran and held 52 Americans hostage for 444 days.
'New chapter of hope'
"I believe this is an historic moment," Zarif, who studied in the United States and developed a warm rapport with Kerry, told a news conference. "Today could have been the end of hope on this issue, but now we are starting a new chapter of hope. Let's build on that."
Kerry said: "This is the good deal we have sought."
European Union foreign policy chief Federica Mogherini, who acted as coordinator for the powers, said it could "open the way to a new chapter in international relations and show that diplomacy, coordination, cooperation can overcome decades of tensions and confrontations.
"I think this is a sign of hope for the entire world."
Hatred of the United States has been a defining trait of Iran's ruling system, seen just last week when it marked the last Friday of the Ramadan fasting month with an annual protest day. Crowds chanted "Death to Israel!" and "Death to America!".
Obama first reached out to Iranians with an address in 2008, only weeks into his presidency, offering a "new beginning". But he followed this up with a dramatic tightening of financial sanctions, which, combined with sanctions imposed by the EU, have imposed severe economic hardship on Iranians since 2012.
Iran has long denied seeking a nuclear weapon and has insisted on the right to nuclear technology for peaceful means. Obama never ruled out military force if negotiations failed, and said on Tuesday that future presidents would still have that option if Iran quit the agreement.
France said the deal would ensure Iran's "breakout time" - the time it would need to build a bomb if it decided to break off the deal - would be one year for the next decade. This has been a main goal of Western negotiators, who wanted to ensure that if a deal collapsed there would be enough time to act.
Obama said Iran had accepted a "snapback" mechanism, under which sanctions would be reinstated if it violated the deal. A UN weapons embargo is to remain in place for five years and a ban on buying missile technology will remain for eight years.
Alongside the deal, the United Nations nuclear watchdog, the International Atomic Energy Agency, announced an agreement with Iran to resolve its own outstanding issues by the end of this year. The main deal depends on the IAEA being able to inspect Iranian nuclear sites and on Iran answering its questions about possible military aims of previous research.
The prospect of an agreement benefiting Iran is anathema to U.S. allies in the Middle East. Tehran does not recognise Israel and supports its enemies. And Arab states ruled by Sunni Muslims, particularly Saudi Arabia, believe that Shi'ite Muslim Iran supports their foes in wars in Syria, Yemen and elsewhere.
While Saudi Arabia did not denounce the deal publicly as Israel did, Saudi officials expressed doubt in private.
"We have learned as Iran's neighbours in the last 40 years that goodwill only led us to harvest sour grapes," a Saudi official who asked to remain anonymous told Reuters.
But there is also a strong reason for the United States to improve its relations with Iran, as the two countries face a common foe in Islamic State, the Sunni Muslim militant group that has seized swathes of Syria and Iraq.
For Iran, the end of sanctions could bring a rapid economic boom by lifting restrictions that have halved its oil exports, and shrunk its economy by about 20 percent, according to U.S. estimates.
The prospect of a deal has already helped push down global oil prices because of the possibility that Iranian supply could return to the market.
Oil prices tumbled more than a dollar on Tuesday after the deal was reached.
"Even with an historic deal, oil from Iran will take time to return, and will not be before next year, most likely the second half of 2016," Amrita Sen, chief oil analyst at London-based consultancy Energy Aspects, told Reuters. "But given how oversupplied the market is with Saudi output at record highs, the mere prospect of new oil will be bearish for sentiment.