Iran has agreed to curb some of its nuclear activities in return for about $US7 billion in sanctions relief, after days of intense talks in Geneva.
US President Barack Obama welcomed the deal, saying it included "substantial limitations which will help prevent Iran from building a nuclear weapon".
Iran agreed to give better access to inspectors and halt some of its work on uranium enrichment.
President Hassan Rouhani said the deal recognised Iran's nuclear "rights".
But he repeated, in a nationwide broadcast, that his country would never seek a nuclear weapon.
The BBC reports Tehran denies repeated claims by Western governments that it is seeking to develop nuclear weapons. It 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, in place of the hard-line Mahmoud Ahmadinejad.
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 an agreement with Iran in the early hours of Sunday.
The specifics of the deal have yet to be released, but negotiators indicated the broad outlines:
- Iran will stop enriching uranium beyond 5%, the level at which it can be used for weapons research, and reduce its stockpile of uranium enriched beyond this point
- Iran will give greater access to inspectors including daily access at Natanz and Fordo nuclear sites
- In return, there will be no new nuclear-related sanctions for six months
- Iran will also receive sanctions relief worth about $7 billion on sectors including precious metals.
Iran's Foreign Minister Mohammad Javad Zarif said it 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.