Only if this is done will the 18 other countries that share the EU's single currency open negotiations for Greece's third bailout in five years - a rescue programme worth up to 86 billion, spanning three years, that is designed to save its banks from going bust and put its economy back on track.
It also requires Athens to park state assets worth 50 billion ($82.5 billion) to ensure that, after trust in Tsipras broke down, his Government sticks to its promises. Tsipras said Greece fought "to the end" for a debt deal to guarantee financial stability and growth.
But members of Tsipras' Syriza party have already reacted angrily to the last-ditch deal, pointing to a political storm ahead that for some commentators may lead to new elections. On Twitter, the hashtag. #ThisIsACoup, which blasted the terms as an attack on Greek sovereignty, trended second in Greece, France, Germany and Britain.
Ahead of the Brussels meeting, Tsipras had gained parliamentary approval at the weekend for concessions that he had bitterly rejected, supported by voters in a hastily-staged referendum on July 5. The conditions now, though, are far worse. Out of 149 MPs in the Syriza Party, 17 refused to support him in last Sunday's vote, and Tsipras was only able to secure a majority in the 300-seat assembly thanks to the right-wing opposition and a motley coalition of Socialists and other leftwing MPs. Fifteen Syriza MPs who backed Tsipras then sent him a letter saying he should not count on them for future reforms.
For app users tap here.
In comments after the deal was struck European Union President Donald Tusk said: "The decision gives Greece a chance to avoid the social (and) political consequences of a negative outcome".
German Chancellor Angela Merkel said trust with Greece "needs to be rebuilt" and that Greece and its European partners face a challenging road ahead to finalise a third bailout. French President Francois Hollande said that for the eurozone to have lost Greece as a member would have been to lose "the heart of our civilisation".
- additional reporting AFP, AP