Europe has agreed on a plan to finally shepherd Greece out of its bailout program and keep it afloat in coming years.
The country's fellow states in the euro currency union said early Friday that they would give Greece its last loans and ease the cost of repaying old ones.
But the deal also means that Greece will have to continue with painful economic measures for years, meaning the pain is not quite over for Greeks.
Heres a look at the deal and what is likely to happen next.
What was the deal?
Greece's creditors gave it a last batch of loans, worth 15 billion euros. That will help Greece cover its financial needs for about 22 months after the end of its bailout in August.
They also gave Greece a ten-year extension in repaying a large chunk of its crippling debt load. In return, Greece has to run budget surpluses, when not counting for the cost of financing its debt, until 2060.
That will require a tight control of public finances.
Does that mean Greece's financial problems are over?
Greek and European officials are saying it's the end of the crisis. But that's yet to be seen.
Greece will have cash to cover it for two years, during which time it will try to start raising money on bond markets. The country's credit rating is still well below investment level.
If international investors don't like Greeces policies, they will ask for prohibitively high rates and Greece will be strapped for cash when its loans run out in 22 months.
So the Greek government has committed to sticking with reforms and savings that aim to convince investors that its finances will keep improving. Public debt is at a high level of 179 percent of GDP.
How will that work?
Stick and carrot, to some extent. Greece's government policies will continue to be supervised by creditors — more strictly than other bailed-out countries.
In return, the European Central Bank will return to Greece some 4.8 billion euros in profits from Greek bonds it bought years ago, in twice-yearly installments through June 2022.
That's a welcome 1.2 billion a year — nearly half Greece's annual revenues from a much-hated property tax introduced as a temporary measure during the crisis and since a permanent fixture.
Will things get better for the Greek people?
Things are improving, but from a low level. Unemployment has fallen from its 28 percent peak, but at 20 percent is still the highest in the European Union.
While the rate has been declining for three years, that is largely due to a sharp increase in flexible or part-time jobs that provide low salaries and harsh work conditions.
Pensioners, who often support younger family members, have had their incomes slashed over the years, and face new cuts.
Some 53 percent of the population said they were unable to cover unplanned but necessary expenses in 2017, 26 percent said they were unable to pay winter heating bills, and one in two could not afford a week's holiday. [AP]