Major powers and Iran have struck a historic deal aimed at ensuring Tehran does not acquire a nuclear bomb, in return for sanctions relief, a diplomat says.
The breakthrough came on the 18th day of marathon talks between Tehran and the so-called P5+1 - the US, Russia, China, Britain, France and Germany in Vienna.
"The agreement is concluded," the diplomat said on Tuesday in the Austrian capital, where a final ministerial meeting between Iran and the world powers was called for 0830 GMT (8:30pm NZT).
EU spokeswoman Catherine Ray said on Twitter that a press conference would follow.
The deal is expected to sharply curb Iran's nuclear program and impose strict UN inspections, making any drive to manufacture nuclear weapons all but impossible and easily detectable.
In return, the web of UN and Western sanctions choking Iranian oil exports and the economy of the 78-million-strong country would be progressively lifted.
The diplomatic push began when Iranian President Hassan Rouhani came to power in 2013. In November that year an interim deal was agreed, but two deadlines in 2014 for a lasting accord were missed.
Then in April, the parties scored a major breakthrough by agreeing the main outlines of an accord, aiming to finalise it by June 30, a deadline since pushed back twice.
Since April, legions of legal and technical experts have made great strides working out the nuts and bolts of how the highly ambitious and technical agreement will work.
The final hurdles had included the exact timing and pace of sanctions relief and Iran's desire to have a UN arms embargo lifted.
The agreement is a diplomatic victory for US President Barack Obama, who made the talks a centrepiece of his foreign policy, as well as for Rouhani, a moderate seeking to bring his country in from the diplomatic wilderness.
They have faced opposition from hardliners from home, as well as from Iran's arch-foe Israel, believed to be the only country in the Middle East with atomic bombs, although it has never confirmed it.