THE bailout deal forced upon Greece by its eurozone creditors was dubbed “a new treaty of Versailles” last night by the country’s former finance minister.

Greece’s radical left-wing government must swallow its principles after it reached agreement with eurozone leaders for the €85 billion bailout early yesterday morning that could avoid financial collapse and secure the country’s place in the euro.

But the deal comes with price: years of enforced austerity and privatisation of state assets. Yanis Varoufakis, who quit last week after falling out with his European counterparts, spoke of the “politics of humiliation”. He said the lenders were taking revenge on prime minister Alexis Tsipras. “It is an impossible deal,” he added. “A deal that is simply not viable.”

Since its election in January the government had vowed to stand up to its creditors and reject the budget cuts they had demanded.

But Varoufakis said: “This has nothing to do with economics. It has nothing to do with putting Greece back on the rails towards recovery. This is a new Versailles Treaty that is haunting Europe again, and the prime minister knows it. He knows that he’s damned if he does and he’s damned if he doesn’t.”

In another interview, he said he had tried to talk economics to the eurogroup ministers before his resignation but they had blanked him: “It’s not that it didn’t go down well – there was point-blank refusal to engage in economic arguments. Point blank.

“You put forward an argument that you’ve really worked on, to make sure it’s logically coherent, and you’re just faced with blank stares.

“It is as if you haven’t spoken. What you say is independent of what they say. You might as well have sung the Swedish national anthem – you’d have got the same reply.”

Negotiations stretched into yesterday morning before a deal was agreed to free the bailout cash and give support to reopen the country’s banks.

However, it now hinges on the Tsipras’s government passing a raft of austerity measures including increases in sales tax, and pension and labour-market reforms.

Greece will be on a tight timetable to implement the changes, an indication of how little its creditors trust the government to honour the deal.

Last month, Tsipras infuriated European partners when he called a referendum which saw Greeks reject reforms the creditors had proposed.

The deadline for a deal was midnight on Sunday, but both sides acknowledged the bitterness that extended their discussions by nine hours. “Trust needs to be rebuilt,” said German Chancellor Angela Merkel, adding: “Greece has a chance to return to the path of growth.”

As a first step towards freeing up its bailout loans, the Greek government will have to agree measures including higher sales tax and pension reform by tomorrow.

Later, Greece will have to make its labour laws more flexible and open up to competition protected industries.

If this is done, Greece will get a three-year rescue programme and a commitment to restructure its debt of €320bn, or 180 per cent of annual GDP.

Tsipras argues that because of these concessions yesterday’s agreement is, despite the austerity, better than the proposals Greeks rejected a week ago.

He said: “We managed to avoid the most extreme measures. Greece will fight to return to growth and to reclaim its lost sovereignty.”

Tsipras said he had managed to avoid a demand by some creditors to transfer Greek assets abroad as a form of collateral and to avoid the collapse of the banking sector.

The country’s banks, shut for two weeks, were still closed yesterday with limits in place on withdrawals. Without a deal the banks faced the prospect of collapse within days.

When they will be able to reopen will depend on whether the European Central Bank decides to increase emergency credit to them now.

Francois Hollande, the French president, celebrated Greece’s continued membership of the euro. Losing Greece, he said, would have been like losing “the heart of our civilisation”.

Others European officials were less emotive. “The Greeks have to show they’re credible, show that they mean it,” said Jeroen Dijsselbloem, president of the eurogroup finance ministers.

The creditors said they would help Greece in the short-term to deal with its debt repayments, since any bailout agreement was not imminent.

It will need help making a €4.2bn debt repayment on July 20. It is also in arrears on about €1.5bn owed to the International Monetary Fund since June 30.

If the talks had failed, Greece faced bankruptcy and exit from the euro, the European single currency that the country has been a part of since 2002.

Greece had requested a three-year, €53.5bn financial package, but that number grew larger by tens of billions as the negotiations dragged on and the leaders calculated how much Greece would need to stay solvent.

Tim Jones, an economist at the Jubilee Debt Campaign said: “This is not an agreement but an outrageous imposition on the Greek people.”

Nick Dearden, director of Global Justice Now , added: “The deal that Greece has agreed to has nothing to do with a democratic union of countries, but rather resembles the imperial politics of the 19th century.”