Theresa May will still be assailed from both sides. She should never have allowed the DUP to hold the talks to ransom, say the Remainers. She has conceded too much, say the hard Brexiters. But she has done the deal.

Four days ago, serious people in her own party thought she faced the end of her time as Prime Minister and there was heated talk about a possible general election. Now she has achieved the breakthrough to the next stage of the Brexit talks, and she seems likely to preside over the whole show, up to and beyond March 2019.

The outcome is a compromise in which both sides gave ground. She wanted a time limit for a role for the European Court of Justice in EU citizens’ rights of five years. The EU offered 10. They agreed on eight.

But perhaps the most significant compromise was that the EU gave way on the negotiating timetable. Last Monday was supposed to be the absolute deadline for the British to produce their proposals, and it was allowed to slip to the end of the week. That means the EU side wants a deal. It still has the upper hand in the negotiations, but it turns out that the UK has some bargaining power after all.

Having achieved everything she set out to achieve – after a short detour through the history of Northern Ireland – Theresa May will still be criticised as a terrible negotiator and a useless Prime Minister.

Even before she took to the rostrum in Brussels this morning, it was being pointed out that the text that had been agreed merely postponed all the difficult decisions to a later stage. In particular, the bit about the Irish border that caused difficulties with the Irish government on the one hand and the DUP on the other – this was solved by promising to do something implausible at a later date.

The text promises that, in the event of a no-deal Brexit, the UK would “maintain full alignment with those rules of the Internal Market and the Customs Union which, now or in the future, support North-South cooperation, the all island economy and the protection of the 1998 Agreement”. It is not even grammatical (“support the protection”?).

Loading....

But that is how international negotiations work. You agree the bits you can agree and put off the difficult bits until later. Again, it is the EU side that has given ground. It refused to move on to the talks about trade until the first three subjects, including the Irish border, had been agreed. This was then downgraded to “until sufficient progress had been made”. There hasn’t really been any progress at all – just a number of mutually contradictory declarations of intent – and yet the EU has agreed to move on.

That is how the next phase is likely to work too. Theresa May has already accepted that, after the UK leaves the EU, nothing much will change for another 21 months or two years. It seems certain that some of the difficult decisions about the future trade relationship with the EU will be postponed until then.