LAUSANNE - Iran and six world powers agreed Thursday on the framework of a potentially historic deal aimed at curbing Tehran's nuclear drive after marathon talks in Switzerland.
It marks a major breakthrough in a 12-year standoff between Iran and the West - which has long feared Tehran wants to build a nuclear bomb - and raised hopes the deal could help stability in the Middle East.
US President Barack Obama welcomed the "historic understanding" with the Islamic republic after decades of hostility but cautioned that more work needed to be done.
"If Iran cheats, the world will know it," he said in a televised address from the White House.
Under the framework, Iran agreed to sharply curtail its nuclear programme in return for the lifting of sanctions that have crippled the country's economy.
Hundreds of Iranians took to the streets of Tehran in celebration after the agreement was announced, with drivers sounding their horns in approval along the capital's longest street, Val-e-Asr Avenue.
But Iran's arch-foe Israel branded the deal a "historic mistake".
The main outlines agreed after eight days of talks that sometimes went through the night in the Swiss city of Lausanne now have to be finalised in a highly complex agreement by June 30.
Failure may set the United States and Israel on a road to military action to thwart Iran's nuclear drive and keep Tehran out in the cold on the international stage.
US Secretary of State John Kerry hailed a "big day" while Iranian President Hassan Rouhani said the drafting of a full accord would begin immediately with the aim of completing it by the June 30 deadline.
EU foreign policy chief Federica Mogherini said the United States and the EU will lift all nuclear-related sanctions on Iran once the UN atomic agency has verified that Tehran has stuck to the ground-breaking deal.
And the US said all past UN nuclear resolutions on Iran would also be lifted.
Kerry said Iran's stocks of highly enriched uranium will be cut by 98 per cent for 15 years while its unfinished Arak reactor will not produce weapons-grade plutonium.
The Fordo facility, built deep into a mountain, will remain open but will not be used for enrichment but for research and development.
The deal will also see Iran reduce by roughly two-thirds - to 6,104 from around 19,000 - the number of uranium centrifuges, which can make fuel for nuclear power but also the core of a nuclear bomb.
Iranian negotiators had been under pressure from domestic hardliners not to give too much away - while also delivering on Rouhani's promise to win the lifting of sanctions.
The so-called P5+1 group - the United States, Britain, China, France and Russia plus Germany - hope that the deal will make it virtually impossible for Iran to make nuclear weapons.
Iran, one of the world's major oil producing countries, has always denied seeking the atomic bomb saying its activities are for energy generation and research.
'Sanctions can be reimposed'
France, which has taken a hawkish line during the negotiations, warned that sanctions could be reimposed if Tehran does not fully keep its side of the bargain.
"Sanctions that are lifted can be reimposed if the deal is not applied," President Francois Hollande's office said in a statement, adding that Paris would watch closely to ensure a "credible" and "verifiable" final agreement that prevents Iran from developing a nuclear weapon.
German Chancellor Angela Merkel said the international community had never "been so close to an agreement preventing Iran from having nuclear weapons".
Russia, which built Iran's nuclear power plant, hailed the deal as a recognition of Tehran's "unconditional right" to pursue a civilian nuclear programme.
The Russian foreign ministry also said the framework deal would have "a positive impact" on the security situation in the Middle East, with Iran "able to play a more active part in the resolution of a number of problems and conflicts in the region".
Successful implementation of the deal could put Iran and the United States on the road to better relations after 35 years of animosity since the 1979-1981 hostage crisis in Tehran.
"A comprehensive, negotiated solution to the Iranian nuclear issue will contribute to peace and stability in the region and enable all countries to co-operate urgently to deal with the many serious security challenges they face," UN chief Ban Ki-moon said in a statement.
Obama wasted no time in trying to sell the deal to sceptical allies, saying he would call Israel's Prime Minister Benjamin Netanyahu, and he invited key Arab allies to a spring summit at the presidential retreat at Camp David.
Obama needs a deal which he can sell to hostile Republicans in Congress, who remain suspicious of Iran's pledges and are threatening to push for new sanctions from April 14.
Republicans and US allies like Israel and Saudi Arabia fear that if too much of Iran's nuclear programme is left intact, it will still have the ability to obtain an atomic bomb.
"If an agreement is reached on the basis of this framework, it is a historic mistake which will make the world far more dangerous," an Israeli government official said.
Crude oil prices fell in New York after the framework accord was announced, with the US benchmark West Texas Intermediate for May delivery down 95 cents to $49.14 a barrel.