Geneva: World powers on Sunday reached an agreement with Iran over its nuclear programme, their chief negotiator Catherine Ashton and Iran's foreign minister said.
"We have reached agreement between E3+3 and Iran," Ashton's spokesman Michael Mann quoted her as saying on Twitter, without giving any details.
Iranian Foreign Minister Mohammad Javad Zarif tweeted: "We have reached an agreement."
And deputy foreign minister Abbas Araqchi said on Twitter Iran's "enrichment programme has been recognised", but did not elaborate whether it was mentioned in the agreement.
Iran had been pushing for what it calls its "right" to enrich uranium to be recognised by the United States, Britain, France, China and Russia plus Germany.
The announcement came after more than four days of talks in Geneva between Iran and the five permanent members of the UN Security Council members plus Germany, chaired by Ashton, who is the European Union's top diplomat.
The talks were aimed at getting Iran to scale back parts of its nuclear programme in return for relief from painful sanctions imposed by the UN Security Council and Western countries.
It was the third meeting in Geneva since Hassan Rouhani became Iranian president in August. The reputed moderate has raised hopes for an end to the decade-old standoff over Iran's nuclear work.
Numerous diplomatic initiatives have failed over the past 10 years to persuade Iran to rein in its programme, which Tehran insists is peaceful but which Western countries suspect is aimed at crafting atomic weapons.
Foreign ministers from the six powers including US Secretary of State John Kerry had jetted into Geneva for the second time in two weeks on Saturday morning after negotiators made good progress.
Hopes they would quickly sew up the agreement faded however as the talks dragged on throughout Saturday and until the early hours of Sunday morning and the announcement at 3:00 am (0200 GMT).
In particular they appeared to snag on Iran's insistence to have its "right" to enrich uranium formally recognised by the six powers, something Western countries strictly opposed.
It was unclear how this tricky issue has been got around in the new deal. Officials were due to give press conferences later Sunday.
The powers were aiming to get Iran to suspend Iran's enrichment of uranium -- which has civilian but at high purities also military uses -- at medium levels, which is close to weapons grade.
They also wanted construction stopped at a new reactor at Arak which could provide Tehran with plutonium, an alternative to highly-enriched uranium for a nuclear weapon.
In return they were offering Iran minor and "reversible" relief from painful sanctions, including unlocking several billion dollars in oil revenues and easing some trade restrictions.
This "first phase" interim deal is meant to build trust and ease tensions while negotiators push on for a final accord to end once and for all fears that Tehran will acquire an atomic bomb.