EU leaders have agreed to hand Theresa May a Brexit extension until October 31.

It came after the Prime Minister vowed to stay on as leader for as long as it takes to deliver her Brexit deal.

European leaders wrangled into the night over whether an extension to Brexit should be short – until June – or long until December or even March 2020.

Later this morning, Theresa May is due to give a Commons statement on the EU offer, which the Government was bound to accept because not to do so would have raised the prospect of Britain crashing out of the Brussels bloc at 11pm tomorrow.

At Westminster, the Prime Minister will face a Conservative backlash from angry Tory MPs, who expected Britain to leave the EU on March 29 – then tomorrow – but now face the prospect of voters taking part in May’s European parliamentary elections and a possible delayed stay until the end of the year.

Iain Duncan Smith, the former party leader, said Mrs May must be forced to go if she returned with a long extension from talks, as participating in European elections would be “an utter disaster” for the Tories.

But in a development that is likely to infuriate Brexiter Tories, Downing Street has indicated her departure will depend on her EU withdrawal agreement being approved by MPs.

Sir Bill Cash, the leading Tory Brexiter, tweeted a letter he had sent to Donald Tusk, the European Council President, claiming “any decision by the Prime Minister to accept a long extension to Article 50 is likely to be challenged in the UK courts”.

READ MORE: Brexit extension: What happens next? Will Theresa May quit? Here's everything you need to know 

In Brussels, Mrs May spent an hour making the case for a short extension to June 30, taking questions from fellow leaders and describing how she believed there was a chance her Government’s talks with the Labour opposition could produce a compromise solution that could get a Commons majority.

EU sources described her performance as “solid and helpful,” much better than her previous presentation, which was regarded as cold, technical and unforthcoming. One insider said the PM claimed the talks with Labour were “going well,” which, it was suggested, was not widely believed.

As the meeting began there was a moment of levity as German Chancellor Angela Merkel showed the PM a side-by-side image on her tablet computer of them wearing jackets of the same colour as they took questions in their respective Parliaments earlier in the day.

After Mrs May left following her presentation, the EU27 leaders discussed Brexit over dinner. It is thought none argued against a Brexit extension, just over how long it should be.

Mrs Merkel emphasised the benefits of a longer delay to give Britain time to sort itself out – the “flextension” option outlined earlier in the week by Mr Tusk.
Most EU leaders backed the idea. It is thought 17 supported a longer delay, but all 27, as well as the UK, had to agree on the final offer.

France’s Emmanuel Macron preferred a shorter extension, warning the EU ran the risk of an obstructive UK still being in the bloc and that jeopardising the running of the EU was “not preferable to a no-deal”. 

Sophie In’t Veld, deputy to Guy Verhofstadt, the EU Parliament’s Brexit negotiator, said EU leaders were concerned about extending Brexit amid threats the UK could cause disruption were it to stay in the bloc after its elections.

She told BBC Newsnight the EU could ask the UK to pledge not to cause problems but said there was a “big question-mark” over how reliable such a vow would be as it would have no legal backing.

A further delay to Brexit piles more pressure on the PM’s future at home.

Three weeks ago Mrs May appeared adamant she would not countenance serving any longer in No 10 if Britain’s membership of the EU were extended beyond June 30.

She told MPs: “As Prime Minister, I am not prepared to delay Brexit any further than June 30.” 

But ahead of the Brussels summit when pressed on this, she appeared to step back, saying the important issue was securing the flexibility to leave the EU early and avoid having to take part in the May Euro elections.

Tory sources stressed the PM stood by her commitment to the backbench 1922 Committee that she would hand over to a successor for the second phase of negotiations after ratification. Last night, the committee met in the Commons but did not discuss the PM’s future.

In a swipe at the Brexit rebels who blocked her Withdrawal Agreement from passing through Parliament in time to leave on March 29, Mrs May said: “I know many people are frustrated the summit is taking place at all because the UK should have left the EU by now.

I greatly regret Parliament hasn’t been able to pass a deal that would have enabled us to leave in a smooth and orderly way.

“But I and the Government continue to work to find a way forward. We have been talking with the Opposition. There’s been serious and constructive talks and they will continue tomorrow.”

Justice Secretary David Gauke made clear he believed the PM could stay on as Tory leader for another year. “I don’t think we should be rushing to change our leader when there is a big task to be done,” he said.

On Tuesday, the scale of opposition within Tory parliamentary ranks to an extension was laid bare when nearly 100 Tory MPs voted against the PM’s decision to ask for a three-month extension to the Article 50 process.

Another 80 abstained, including four Cabinet ministers Andrea Leadsom, Liam Fox, Chris Grayling and Geoffrey Cox, which meant a majority of Tory MPs defied the leadership.

During PMQs yesterday, Conservative MPs questioned the wisdom of any extension. Warwickshire Tory Craig Tracey told Mrs May the best way to respect the party’s manifesto commitments was "to go under WTO rules".

Today, inter-party talks on Brexit are due to resume.
Jeremy Corbyn’s spokesman said the Government had found it “pretty difficult” to move off their red lines.

“There is still serious engagement and exploration of new and different elements and[Tuesday’s] talks expanded the frame to include new areas.”

In a separate development, Nicola Sturgeon took to social media to underline what might be possible were Scotland an independent nation.

She tweeted: “Tonight, 12 of the 27 EU member states that will decide the UK’s future have populations smaller than or similar in size to Scotland’s.

“If we become independent we get to sit at that table - enjoying the same solidarity shown to Ireland - instead of being sidelined by Westminster.”