The United States, Iran and five other world powers have announced an agreement outlining limits on Iran's nuclear programme to block it from developing atomic weapons.
The move, after marathon negotiations, directs negotiators towards a final accord this summer.
The US and Iran each hailed the framework, reached by weary but upbeat diplomats after a week of intense diplomacy in Switzerland that capped 18 months of negotiations.
Speaking from the White House, US president Barack Obama called it a "good deal" that would address concerns about Iran's nuclear ambitions.
Crucially for the Iranians, it would also provide them broad relief over time from international sanctions that have crippled their economy.
Still, critics in both nations as well as wary US allies Israel and Saudi Arabia were likely to oppose the "plan of action" because of concessions allowing Iran to maintain significant elements of a programme that could be used to produce either energy or nuclear arms.
"I am convinced that if this framework leads to a final comprehensive deal, it will make our country, our allies and our world safer," Mr Obama declared. "It is a good deal, a deal that meets our core objectives."
In the Swiss city of Lausanne, European Union foreign policy chief Federica Mogherini and Iranian foreign minister Mohammad Javad Zarif read out a joint statement hailing what they called a "decisive step" after more than a decade of work.
US secretary of state John Kerry and the top diplomats of Britain, France and Germany took the stage behind them.
Mr Kerry defended America's compromises.
"Simply demanding that Iran capitulate makes a nice soundbite, but it is not a policy, it is not a realistic plan," he said. Still, he said that "many technical details" must be ironed out.
Negotiators from the nations involved - including Russia and China - will now start writing the text of a final accord.
Ms Mogherini cited several agreed-upon restrictions on Iran's enrichment of uranium, a core concern because the material can be used in a nuclear warhead. She said a planned heavy water reactor in Iran would not produce weapons-grade plutonium and work at a deeply buried underground facility at Fordo would not involve uranium.
Economic sanctions related to Iran's nuclear programmes are to be rolled back after the UN nuclear agency confirms compliance.
Mr Zarif told reporters the agreement would show "our programme is exclusively peaceful, has always been and always will remain exclusively peaceful", while not hindering the country's pursuit of atomic energy for civilian purposes.
"We will continue enriching," he said. "We will continue research and development." He said the heavy water reactor would be "modernised".
"We have taken a major step but are still some way away from where we want to be," Mr Zarif said, calling Thursday's preliminary step a "win-win outcome".
He voiced hope that a final agreement might pave the way for a broader easing of suspicion between the US and Iran, which have not had diplomatic relations since the 1979 overthrow of the shah and subsequent US embassy hostage crisis in Tehran.
The leaders spoke following week-long talks that were twice extended past a March 31 deadline for a preliminary deal. Negotiators worked concurrently on documents describing what needs to be done for the final agreement.
The US and its five partners want to curb Iran's nuclear technologies so the country cannot develop weapons. Tehran denies such ambitions but is negotiating because it wants economic sanctions to be lifted.
The final breakthrough came a day after a flurry of overnight sessions between Mr Kerry and Mr Zarif, and meetings involving the six powers.
Mr Zarif said the all-night negotiation at such a senior level was "probably a record". Iran has no intention of violating an agreement it has put so much effort into crafting, he said.
Israeli leaders, deeply concerned about Iran's intentions, were much less positive.
Prime minister Benjamin Netanyahu said a final agreement "must significantly roll back Iran's nuclear capabilities and stop its terrorism and aggression".
The Obama administration also faces strong domestic pressure. Critics in Congress are threatening to impose new sanctions over what they believe is a bad deal taking shape.
In the Rose Garden, Mr Obama said the issues at stake are "bigger than politics".
"These are matters of war and peace, and they should be evaluated based on the facts," he said.