Iran has agreed to curb some of its nuclear activities in return for about $7bn (£4.3bn) in sanctions relief, after days of intense talks in Geneva.
The deal will last for six months, while a permanent agreement is sought.
US President Barack Obama welcomed the deal, saying it would "help prevent Iran from building a nuclear weapon".
Iranian President Hassan Rouhani said Iran's right to uranium enrichment had been recognised. Israel, however, said the agreement was a "historic mistake".
World powers suspect Iran's nuclear programme is secretly aiming at developing a nuclear bomb - a charge Iran has consistently denied.
In a nationwide broadcast on Sunday, President Rouhani repeated that his country would never seek a nuclear weapon. He hailed the deal, saying it met one of Iran's fundamental principles.
"No matter what interpretations are given, Iran's right to enrichment has been recognised," he said.
Iran agreed to halt enrichment to medium-grade (20%) purity, which can be further enriched to weapons-grade level relatively easily, and give better access to UN inspectors.
Tehran insists it must be allowed to enrich uranium to use in power stations.
The deal comes just months after Iran elected Mr Rouhani - regarded as a relative moderate - as its new president, succeeding the hardline Mahmoud Ahmadinejad.
It has also been backed by Iran's Supreme leader Ayatollah Ali Khamenei, who has the final say in nuclear matters.
After four days of negotiations, representatives of the so-called P5+1 group of nations - the US, the UK, Russia, China, France and Germany - reached the agreement with Iran in the early hours of Sunday.
Key points of the deal have been released by the White House:
- Iran will stop enriching uranium beyond 5%, and "neutralise" its stockpile of uranium enriched beyond this point
- Iran will give greater access to inspectors including daily access at Natanz and Fordo nuclear sites
- There will be no further development of the Arak plant which it is believed could produce plutonium
- In return, there will be no new nuclear-related sanctions for six months if Iran sticks by the accord
- Iran will also receive sanctions relief worth about $7bn (£4.3bn) on sectors including precious metals
US Secretary of State John Kerry said the agreement would make the region safer for its allies, including Israel.
But the Israeli Prime Minister Benjamin Netanyahu told his cabinet it was a "historic mistake" and that his country reserved the right to defend itself.
"Today the world became a much more dangerous place because the most dangerous regime in the world made a significant step in obtaining the most dangerous weapons in the world," he said.
At a later news conference, Mr Netanyahu said Israel would not be bound by the agreement.
"We cannot and will not allow a regime that calls for the destruction of Israel to obtain the means to achieve this goal.
"Israel has many friends and allies, but when they're mistaken, its my duty to speak out."
The Israeli comments came as it was revealed that the US and Iran had held a series of face-to-face talks in recent months that paved the way for the agreement but were kept secret even from their allies.
At least five meetings, involving Deputy Secretary of State William Burns, Vice President Joe Biden's senior foreign policy adviser Jake Sullivan and Iranian officials, began in March at undisclosed locations, including the Gulf state of Oman, according to the Associated Press news agency.
The final four meetings were held after President Rouhani was elected in August. The talks were personally authorised by President Obama, AP reports quoting senior US administration officials.
The officials told AP they were "convinced that the outreach had the blessing of Ayatollah Khamenei".
Oman's Sultan Qaboos played a key role after offering himself as a mediator, according to AP.
Iran's Foreign Minister Mohammad Javad Zarif said the agreement was an opportunity for the "removal of any doubts about the exclusively peaceful nature of Iran's nuclear programme".
But he insisted that Iran had not given up its right to enrich uranium.
"We believe that the current agreement, the current plan of action as we call it, in two distinct places has a very clear reference to the fact that Iranian enrichment programme will continue and will be a part of any agreement, now and in the future," he said.
The US denied any such right had been conceded, while UK Foreign Secretary William Hague said the agreement was "good news for the whole world".
But Mr Obama warned that if Iran fail to keep its commitments, "we will turn off the relief and ratchet up the pressure".
This deal may be the most significant agreement between the world powers and Iran for a decade, says the BBC's James Reynolds in Geneva.
In this latest round of talks, negotiators had been working since Wednesday to reach an agreement that was acceptable to both sides.
It became clear that a breakthrough had been made in Geneva shortly before 03:00 local time (02:00 GMT) on Sunday.
In further reaction, President Vladimir Putin of Russia said he looked forward to a more comprehensive agreement.
"What is done is a breakthrough but it is merely the first step on a long and difficult road," he said in a statement.
"In conjunction with our partners we are ready to continue the patient search for a mutually-acceptable, broader and comprehensive solution that upholds Iran's inalienable right to develop a peaceful nuclear programme."