US President Barack Obama said that with the deal, "every pathway to a nuclear weapon is cut off" for Iran.
His Iranian counterpart, Hassan Rouhani, said it opened a "new chapter" in Iran's relations with the world.
The deal reportedly gives UN nuclear inspectors extensive but not automatic access to sites within Iran.
Negotiations between Iran and six world powers - the US, UK, France, China and Russia plus Germany - began in 2006.
The so-called P5+1 want Iran to scale back its sensitive nuclear activities to ensure that it cannot build a nuclear weapon.
Iran, which wants crippling international sanctions lifted, has always insisted that its nuclear work is peaceful.
Mr Obama said that the deal "makes the world safer and more secure", and that it provides for a rigorous verification regime. "This deal is not built on trust - it is built on verification," he said.
EU foreign policy chief Federica Mogherini said the deal was "a sign of hope for the entire world".
"It is a decision that can open the way to a new chapter in international relations," she said, ahead of a final meeting between negotiators in Vienna.
Getting the Eastern Neighbourhood right is a key necessity for the future security and prosperity of Europe. The Brussels summit offers an opportunity for important steps on this matter in the right direction – not as an end in themselves but rather as a part of a longer term and more ambitious vision.
An incident at a military facility of the self-declared Nagorno-Karabakh Republic resulted in three Armenian soldiers killed and one seriously injured. It is not clear what the exact circumstances of the incident were, but for the moment it is being treated as an accident.