Greek Prime Minister Alexis Tsipras and German Chancellor Angela Merkel meet

On Bastille Day, Greece’s leader, Alexis Tsipras, agreed to a deal with the European Union that will ensure that the European Central Bank restores credit to Greek banks, and that will ultimately guarantee up to 80 billion euros of debt relief.

The price, however, is incredibly high — “vindictive”, as described by Paul Krugman, piling back on conditions that the troika had abandoned. Chief among its demands are the placing of 50 billion euros worth of Greek state assets in a privatisation fund.

Other new measures include a commitment by the Greeks to “re-examine” laws passed since the election of Syriza on the February 20, which are judged to go against the “spirit” of the terms of negotiation.

That includes some very small measures such as the re-employment of some public-service office cleaners who had been illegally sacked by the departing New Democracy government.

The “agreement” allows the troika to reach into the micromanagement of the Greek state on matters such as the management of pharmacies, Sunday trading and the like. There is a degree of bizarre obsessiveness on the part of the EU that may well open it to ridicule when the deal becomes better known.

Tsipras is arguing for acceptance of the deal on the grounds of the big things the Greeks did get — a reduction of the demands for running surpluses at 4%-4.5% (down to 1%-3%), a large slice of debt servicing, a carefully hidden debt haircut.

In the new round of demands, the Greeks have retained control of the 50 billion euro “privatisation” fund, with 25 billion euros going to domestic recapitalisation.

Many of these gains are being ignored in the reporting of the deal in favour of the more humiliating and petty ones. Nevertheless, the degree of political sadism and cheap point-scoring in these measures may put Tsipras in an extremely difficult position at home.

It is likely that any sort of deal can get through with the support of the opposition centre-right New Democracy, PASOK, and the centrist Potami party, together with the Syriza centre.

The question is what effect it will have on Syriza, and whether the party, a coalition of groups, can hold together. The “left platform” group in the party supported the earlier deal, with a little fraying — this one may be a bridge too far.

Which may well be the point of the exercise from the EU side: to put Tsipras in an impossible position, divide the government, and cause fresh elections, thus guaranteeing further chaos, and push people back to New Democracy on the promise of a deal on the table.

The deal as it stands is galling in the detail, but still a win for Tsipras, in getting a less bad deal than was on offer before the referendum. Yet the nature of the detail is so angering that it may well cause basic revolt and disarray.

The deal has been decried around the world as an unnecessary humiliation of Greece — “worse than Versailles”, as it has been described. It comes as former finance minister Yanis Varoufakis revealed that EU commissioner had told him that a “Grexit” was always the intent of EU technocrats (though not private banks) — to use the country as an example to other smaller southern nations, and to get it off the books.

Tsipras and the Syriza centre have fought to stay in the eurozone and the EU, not out of any abstract commitment to the European project, but of the sheer disarray if a Grexit were to occur, without a firm hand on power. Above all, it wants Europe still involved in Greece, and responsible for its fate — rather than casting it off to the promise of a new national civil war.

Whether this has been a clear-sighted rationale remains to be seen. Some — an increasing number — argue that Tsipras has been captured by the sheer process of summit meetings, collective browbeating, etc, and lost his perspective on wider options.

All of that means that nothing is guaranteed over the next few days, let alone weeks — what Tsipras might do next, and whether he will still be the one doing it in the weeks to come. With the issue now dividing other countries — France and Italy now siding with Greece to an important degree and the release of an extraordinary amount of bitterness on all sides — it has been an impressively rapid passage to the guillotine of a half-century of the European project in the space of a week.

Yes, yes, a week is a long time, etc. But so is 50 years …