An outline agreement on the future shape of Iran's nuclear programme has been reached after marathon talks with six major powers in Switzerland.
Under the deal, Iran will reduce its uranium enrichment capacity in exchange for phased sanctions relief.
US President Barack Obama said a "historic understanding" had been reached with Iran.
The world powers and Iran now aim to draft a comprehensive nuclear accord by 30 June.
The framework agreement was announced by the European Union and Iran after eight days of negotiations in Lausanne.
The talks between the so-called P5+1 - the US, UK, France, China and Russia plus Germany - and Iran at Lausanne's Beau-Rivage Palace hotel continued beyond the original self-imposed deadline of 31 March.
Iran denies Western claims it is trying to build a nuclear weapon. It entered negotiations in order to see sanctions lifted.
According to the United States, the outline includes the following conditions:
- Iran will reduce its installed centrifuges - used to enrich uranium - by two-thirds and reduce its stockpile of low-enriched uranium
- The centrifuges that are no longer in use will be placed in storage, monitored by the International Atomic Energy Agency (IAEA)
- All of Iran's nuclear facilities will be subject to regular IAEA inspections
- Iran will redesign its heavy-water reactor in Arak so that it cannot produce weapons-grade plutonium
- US and EU sanctions related to Iran's nuclear programme will be lifted in phases, but can be brought back if Iran does not meet its obligations.
Mr Obama said the deal's implementation would be closely watched. "If Iran cheats, the world will know it," he said, adding that the deal was based not on trust but on "unprecedented verification".
He said the framework agreement had come after "months of tough, principled diplomacy", and that it was "a good deal".
EU foreign policy chief Federica Mogherini, speaking at a news conference alongside Iranian Foreign Minister Javad Zarif after agreement was reached, said a "decisive step" had been achieved.
"We have reached solutions on key parameters of a joint comprehensive plan of action," she said.
Negotiators would now start "drafting the text" of the plan "guided by the solutions", Ms Mogherini added.
News that a deal had been agreed emerged on Twitter, before the official news conference.
In a tweet, Mr Zarif said: "Found solutions, ready to start drafting immediately."
And US Secretary of State John Kerry tweeted: "Big day... Back to work soon on final deal."
But Israeli leader Benjamin Netanyahu also took to Twitter to declare: "Any deal must significantly roll back Iran's nuclear capabilities and stop its terrorism and aggression."
U.S. House of Representatives Speaker John Boehner said the deal was an "alarming departure" from President Barack Obama's initial goals.
Boehner did not outline how the deal departed from initial negotiating goals. But he said Congress must fully review the deal before any sanctions on Iran are lifted.
"In the weeks ahead, Republicans and Democrats in Congress will continue to press this administration on the details of these parameters and the tough questions that remain unanswered," Boehner said.
- Reuters / BBC