Eurozone finance ministers have agreed a second bailout for Greece after marathon talks in Brussels.
Greece is to receive loans worth more than 130bn euros (�110bn; $170bn).
In return, Greece will undertake to reduce its debts to 120.5% of its GDP by 2020 and accept an "enhanced and permanent" presence of EU monitors to oversee economic management.
Greece needs the funds to avoid bankruptcy on 20 March, when maturing loans must be repaid.
After five straight years of recession, Greece's debt currently amounts to more than 160% of its Gross Domestic Product.
The euro immediately rose on reports of the deal, which was announced early on Tuesday, after 13 hours of talks. Repayment takes priority
The deal also means that private holders of Greek debt will take losses of 53.5% on the value of their bonds.
When all the elements of the exchange are accounted for, the loss to investors is expected to be as much as 70%.
Eurozone leaders and the IMF said in October that Greek debt should be reduced to a more sustainable level of 120% of GDP by 2020. Continue reading the main story Analysis image of Mark Lowen Mark Lowen BBC News, Athens
This is in effect uncharted territory for the eurozone - a managed Greek default, with over 50% of the country's private debt being written off. This was not even being considered as an option several months ago.
But the Greek people will be sceptical about this bailout. The deal that has been agreed will mean more austerity and spending cuts, and even more pain for Greeks. Many will be concerned that the new measures will kill off prospects of growth and lock the country into a spiral of recession.
Greeks say that the country's middle classes who have worked hard and pay their taxes are, unfairly, bearing the brunt of a crisis they did not create. They feel Greece's notorious corrupt politicans and wealthy Greeks who evaded tax are to blame.
The deal provides for the presence of EU monitors of Greece's economic management as some members doubt Greece's commitment to its spending pledges.
Within the next two months, Greece will also have to pass legislation giving priority to debt repayments over the funding of government services.