Correction/June 16, 2017: A previous headline of this story stated that Greece had been granted long-term debt relief. That was incorrect. Eurozone ministers only agreed to a bailout deal and warned that Greece would have to wait for debt relief.

Greece came away from Thursday's Eurogroup meeting with a $9.5bn (€8.5bn) loan installment and the beginnings of a commitment to longer-term debt relief - the Syriza government's key demand since it came to power in 2015.

The six hour-long meeting of Eurozone finance ministers effectively brought the International Monetary Fund on board with Greece's third bailout loan, currently held only by European institutions, because the IMF insisted on debt relief as a precondition.

"Nobody claims that this is the best solution," said IMF chief Christine Lagarde, who attended the Eurogroup session. "That would have been a final approval on debt relief so that there would be clarity. This is second best."

Eurogroup Chairman Jeroen Dijsselbloem called the agreement "a major step forward" which prepared Greece for graduation from its programme in 2018.

The Eurogroup praised Greece for legislating all 140 prior actions required to pass its second review under the programme – specifically in terms of tax reform, pension reform and labour market reform, all of which aim to make its economy more competitive.

In terms of debt relief, the Eurozone made two concrete concessions. First, it promises to link Greece's rate of debt repayment to its rate of growth. The better the economy does in a given year, the more Greece will pay back. The corollary is that if Greece has little or no growth, it ought to receive a reprieve from creditors. This was a key demand of former finance minister Yanis Varoufakis in 2015, who claimed that a depressed economy could not reasonably be squeezed for debt repayment.

As if to underline this point, Greece is being asked to spend about two percent of its economy on debt repayment after 2023. It has committed to spend 3.5 percent until then.

Second, the Eurogroup agreed to defer and extend repayment of Greece's second bailout loan by up to 15 years. This loan, which ran from 2012 to 2015, was Greece's largest and $145bn (€130bn) of it is still outstanding. That amounts to almost half of the entire debt.

These two measures will be put into effect between now and the end of the programme, but the Eurogroup will specify further debt relief measures to take effect after the summer of 2018. It has to specify these by July 27, in order for the IMF to become a participant in the third bailout.

The extension of Greece's second bailout loan is something the IMF had recommended in late 2015, and the implication is that it expects the Eurozone to follow its other recommendations as well – such as an extension of Greece's first (2010) bailout loan, now worth $59bn (€53bn) and a fixed, low interest rate of not more than 1.5 percent until 2060.

"The Greek side got what it wanted," said a statement from the prime minister's office. "The most important part of today's decision is that for the first time there is a clear Eurogroup commitment to help Greece graduate from its programme and return to markets."

Another reason for announcing debt relief a year before the end of the programme is to encourage investors to return to the country. As of Thursday night, it was still unclear whether the Eurogroup's statements were going to achieve those goals.

New period of friendship?

European politics are also divided on the issue of debt relief, because of the fear of encouraging other fiscal laggards to expect similar treatment. The lead-up to this agreement has been acrimonious, and it is still unclear whether Greece will convince Eurozone hardliners, led by Germany, to give it the full debt relief the IMF has outlined.

On Wednesday, Greek economy minister Dimitris Papadimitriou took aim at the powerful German Finance Minister Wolfgang Schaeublein an interview with the Die Welt newspaper.

Greece's Eurozone bailout talks fail

"For eight years we have been following the creditors' demands, but the progress is slowed down by the fact that new conditions are constantly being raised," he said. "Wolfgang Schaeuble also said that we had met the requirements. But then he changed his mind. You ask yourself 'what is behind it?' I have not yet met Schaeuble, and I do not want to be rude, but his behavior seems to me dishonest."

Prime Minister Alexis Tsipras published an op-ed in Die Welt and Le Monde on the same day.

"For the French, the Germans or the Italians, the Greek debt is just a newspaper headline. For my fellow-citizens it is a source of daily concern as they try to change their country, to stand on their feet, to create businesses that will bring back jobs and growth."

"The answer to the question of Greek debt sustainability is growth," he said. "For that to happen, the debt has to be rescheduled so the economy can breathe and markets can restore their confidence."

Pensioners marched in protest on parliament in Athens on Thursday morning.

"They're legislating to cut our pensions in 2019, even after this government's term in office is over," said Vasilis Epikaridis, a retired aircraft mechanic. "That will take another 30 percent out of our pensions, and they're reducing tax exemptions. Pensioners who have paid in for so many years will be poorer." Epikaridis says his pension was meant to be €2,800 a month, but has been cut to €1,250.

The Greek economy was forecast to grow by 2.7 percent this year, but the Hellenic Statistical Authority reports that it Grew by just 0.4 percent in the first quarter. The Federation of Greek Industry today reports 53.6 unemployed people for every job vacancy.

Greece came away disappointed from the May 22 Eurogroup, where it had hoped to win the debt restructuring the International Monetary Fund says it needs. That meeting produced no communiqué, because the 19 countries couldn't agree a common position on the IMF's recommendations, Tsakalotos told reporters in Athens.

"There was one line in the Eurogroup statement that made it impossible for us to accept," Tsakalotos said. "That line said, 'We the Eurogroup understand that the above measures on debt are not enough for the IMF to consider the debt sustainable.' That statement essentially is a signal to markets - 'don't invest in Greece'."