LAUSANNE, Switzerland — After marathon negotiations, the United States, Iran and five other world powers announced a deal Thursday outlining limits on Iran’s nuclear program so it cannot lead to atomic weapons, directing negotiators toward a comprehensive agreement within three months.

Reading out a joint statement, European Union foreign policy chief Federica Mogherini hailed what she called a “decisive step” after more than a decade of work. Iranian Foreign Minister Mohammad Javad Zarif followed with the same statement in Farsi. US Secretary of State John Kerry and the top diplomats of Britain, France and Germany also briefly took the stage behind them.

President Barack Obama was to speak at midafternoon at the White House.

In Lausanne, Kerry said in a tweet that there was agreement “to resolve major issues on nuclear program. Back to work soon on a final deal.” He was expected to brief reporters later Thursday.

Mogherini said the seven nations would now start writing the text of a final accord. She cited several agreed-upon restrictions on Iran’s enrichment of material that can be used either for energy production or in nuclear warheads.

Crucially for the Iranians, economic sanctions related to its nuclear programs are to be rolled back after the UN nuclear agency confirms compliance.

Zarif told reporters the agreement would show “our program 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.

“Our facilities will continue,” he said. “We will continue enriching, we will continue research and development.” He said a planned heavy water reactor will be “modernized” and that the Iranians would keep their deeply buried underground facility at Fordo.

“We have taken a major step but are still some way away from where we want to be,” Zarif said, calling Thursday’s preliminary step a “win-win outcome.”

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.”

Mogherini said Iran’s heavy water reactor wouldn’t produce weapons-grade plutonium and that Fordo wouldn’t be a site for enrichment of uranium, which can be used for nuclear weapons.

The officials spoke following weeklong talks that were twice extended past a March 31 deadline for a preliminary deal. Although the US pushed for concrete commitments, the Iranians insisted on a general statement of what had been accomplished. 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 it cannot develop weapons. Tehran denies such ambitions but is negotiating because it wants economic sanctions imposed over its nuclear program to be lifted.

Washington, in particular, faces strong domestic pressure. Critics in Congress are threatening to impose new sanctions over what they believe is a bad deal taking shape and the Obama administration needed to make as many details public as possible to sell the merits of its diplomatic effort.

The final breakthrough came after a flurry of overnight sessions between Kerry and Zarif, and meetings involving the six powers.