Eurozone leaders have reached agreement over a third Greek bailout after marathon talks in Brussels.
Greece has won conditional agreement to receive up to €86bn (£61bn; $95bn) over three years, although this is not yet in the bag.
But it has had to make substantial concessions in return - and the consequences for the Greek economy look set to be far-reaching.
What are the main areas of economic reform stipulated by the deal?
In a nutshell: taxation, pensions, the labour markets, banks and privatisation.
- The agreement refers to "the streamlining of the VAT system and the broadening of the tax base to increase revenue". It seems that more items will be subject to the country's top VAT rate of 23%, including restaurants, while popular holiday destinations in the Greek islands will no longer benefit from a lower VAT rate. Corporation tax will also go up, to 28%.
- There will be "upfront measures to improve long-term sustainability of the pension system as part of a comprehensive reform programme". That means the retirement age will rise to 67 by the year 2022, while aid to the poorest pensioners will be phased out by the end of 2019.
- Labour markets will be liberalised, as will shop opening hours, with "rigorous reviews and modernisation of collective bargaining, industrial action and, in line with the relevant EU directive and best practice, collective dismissals". The Greek government is sternly warned that the country's past approach is "not compatible with the goals of promoting sustainable and inclusive growth".
- Greece must "adopt the necessary steps to strengthen the financial sector". This means taking tougher action on non-performing loans and strengthening banking governance, including "eliminating any possibility for political interference, especially in appointment processes". In fact, the deal calls for a specific programme for "de-politicising the Greek administration".
- The electricity transmission network is to be sold off as part of "a significantly scaled-up privatisation programme with improved governance".
Privatisation has been a key sticking point in all this. How is that "improved governance" going to be achieved?
This is one of the most far-reaching aspects of the deal. The text of the summit statement says: "Valuable Greek assets will be transferred to an independent fund that will monetise the assets through privatisations and other means."
It says the fund will be established in Greece and managed by the Greek authorities, but "under the supervision of the relevant European institutions" - that is, the European Central Bank and the European Commission, which, along with the International Monetary Fund, have been supervising Greek finances throughout the crisis.
In effect, this is being seen as a trust fund outside the control of the Greek government, which can cherry-pick Greek assets and dispose of them in order to repay the country's debts.
The summit document quotes a figure of €50bn for the value of the fund. Of that, half will go towards recapitalising the country's cash-strapped banks, whose health - or lack of it - has been so much under scrutiny in recent months.
A quarter of the proceeds of the fund will be used for reducing Greece's debt-to-GDP ratio, while the remaining €12.5bn will be used for investments in Greece.
Does all this mean that Greece is rescued?
As far as eurozone leaders are concerned, these conditions are necessary, but not sufficient, and they will not tolerate any backsliding.
As their statement says: "The above-listed commitments are minimum requirements to start the negotiations with the Greek authorities. However, the euro summit made clear that the start of negotiations does not preclude any final possible agreement on a new ESM programme."
The ESM is the European Stability Mechanism, the eurozone's rescue fund. The document says that the summit "takes note of the possible programme financing needs of between €82bn and €86bn".
It also "takes note" of Greece's "urgent financing needs" of €7bn by 20 July and another €5bn by the middle of August.
You might wish to take note of the fact that so far, the EU has not yet firmly undertaken to pay out one cent to Greece.
For now, everything hinges on whether Greece's leftist Syriza government can get this package approved by the country's parliament.
By Wednesday night, Greek MPs have to vote on a raft of measures covering the VAT increases, the pension changes, the independence of the country's national statistics institute and commitments to "fiscal consolidation".
Only then can final agreement on the latest bailout be reached.
Many people believe that Greece's debt burden can never be repaid and that austerity is only making things worse. Is there any support for that view in the summit document?
None whatsoever. The text says that "the euro summit stresses that nominal haircuts on the debt cannot be undertaken" - in other words, eurozone leaders have no intention of unilaterally reducing the amount that Greece owes.
In 2011, Greece's private lenders took a massive 50% haircut on what they were owed, reducing Greece's debt by €100bn. Greece pushed for a second debt haircut this year, but has failed to reach an agreement with its creditors.
And the Greek government seems to have accepted that a second haircut is not going to happen, since the document says that "the Greek authorities reiterate their unequivocal commitment to honour their financial obligations to their creditors fully and in a timely manner".