Theresa May has agreed to delay Brexit until Halloween to avoid Britain crashing out of the EU with no deal on Friday.
During an historic six hour summit in Brussels, the other 27 EU leaders thrashed out the length and terms of a so-called “flextension” which will come to an end on October 31 over four hours, with the prime minister locked out of the room.
May had been asking for a short delay until June 30 to avoid a no-deal Brexit on the previously agreed cliff edge April 12, previously suggesting she could resign if Article 50 was extended any longer.
But she accepted the six-month postponement after stressing that her main goal was ensuring the UK could get out of the EU early if she could find a way to break the Westminster impasse and pass a Brexit deal in parliament.
The lengthy delay will anger Tory Brexiteers wanting to oust May, who plans to stay on as PM until Brexit is delivered rather than use the extension to make way for a new face.
MPs on the powerful 1922 committee of Tory backbenchers are said to be working on a timeline for May to stand down, which would see her resigning as party leader by May 23, when the UK will have to take part in European elections if it is still an EU member.
But a Tory source suggested she will remain in post until the UK leaves the EU, making way for a new PM to take over negotiations on a long-term trade relationship.
The source said: “She understands that the Conservative party feels a sense that new leadership is required for the second phase of negotiations.
“That was the commitment she gave to her parliamentary colleagues and that’s one she stands by.”
The European Council summit had threatened to drag on into the small hours after French president Emmanuel Macron argued against a wider consensus for a long delay until the end of the year or even into 2020, backing May’s preference for the end of June.
But in the end a compromise of October 31 was reached by EU leaders and accepted quickly by May after consulting Attorney General Geoffrey Cox by telephone.
Under the terms of the agreement, the UK can leave at any time if the withdrawal agreement reached last November is ratified by the Westminster parliament.
If the UK fails to take part in elections to the European Parliament on May 23-26, it will automatically leave without a deal on June 1.
A review of progress will take place at the scheduled June 20 EU leaders’ summit in Brussels, but European Council president Donald Tusk stressed that this would be an opportunity for “taking stock” and not for any new negotiations.
The term of the current European Commission under Jean-Claude Juncker ends on October 31.
A UK exit by that date would get round the diplomatically awkward requirement for London to appoint a new commissioner to his successor’s team.
But asked whether a further extension might be possible, Tusk replied: “Our intention is to finalise the whole process in October... but I am too old to exclude another scenario. I think still everything is possible.”
May said that she still wanted the UK to leave the EU “as soon as possible”.
If a withdrawal deal could be ratified within the first three weeks of May, the UK could still avoid participation in that month’s European elections and leave the EU in June, she said.
Acknowledging “huge frustration” among voters that the UK has not yet left the EU, she said: “The choices we now face are stark and the timetable is clear.
“So we must now press on at pace with our efforts to reach a consensus on a deal that is in the national interest.”
Talks between the government and Labour to find a compromise way forward will continue at official level on Thursday.
“I do not pretend the next few weeks will be easy or that there is a simple way to break the deadlock in Parliament,” said May.
“But we have a duty as politicians to find a way to fulfil the democratic decision of the referendum, deliver Brexit and move our country forward. Nothing is more pressing or more vital.”