"Today we had only one objective: to reach an agreement. After 17 hours of negotiations we have finally reached it. Someone can say that we have an 'agreekment'."

These were the punning words from Eurogroup President Donald Tusk, confirming that what many thought could never happen hadbeen achieved after all-night talks in Brussels: a new debt deal reached between Greece and its creditors. But what exactly has been agreed by Greece and what will the long-term impact be for both the country and Europe? In this video, IBTimes UK explains.

Measures that Greece must implement immediately include automatic spending cuts, a broadening of the tax base and reforms to the pensions system.

A key measure is the transfer of €50bn (£36bn, $55bn) of Greek assets to a new fund, with half of the fund going towards recapitalising the country's cash-strapped banks.

Discussions will begin immediately on a short-term finance option to avert the collapse of Greece's banks.The country has also been promised further talks on restructuring its debts.

It all means that a 'Grexit', a Greek exit from the Eurozone in which the country would have had to abandon the euro and form its own currency, will now not take place.

But there is still some way to go for the debt deal to come into effect, as Greek Prime Minister Alexis Tsipras must win approval of the new deal from his parliament on 15 July. Parliaments in several other Eurozone states also have to approve any new bailout.