LONDON -- A clearly frustrated European Union has given Britain some headroom to find a way out of its Brexit quagmire by agreeing an extension to the country's departure until Halloween. But now it's up to Britain's squabbling politicians to work out if they can meet the new deadline.
Prime Minister Theresa May is expected to brief Parliament Thursday on the results of the emergency EU summit that ended in the early hours, but her path toward actually taking Britain out of the EU remains unclear.
She is blocked by a strong faction in her own Conservative Party that hates her withdrawal deal and hopes to oust her, and talks aimed at winning support from the opposition Labour Party are moving forward slowly, if at all.
May's own authority has been gravely compromised by the long Brexit ordeal and she has promised to step down once Britain leaves the bloc — if efforts to get rid of her more quickly do not bear fruit.
Faced with so much uncertainty, EU leaders whose talks went well after midnight agreed on a new Oct. 31 cutoff date. If no extension was granted, then Britain faced the prospect of crashing out of the EU this Friday with no deal, a scenario that in Parliament worry would lead to a deep recession as tariffs are imposed on U.K. exports and other restrictions on trade are imposed.
"Please, do not waste this time," European Council President Donald Tusk pleaded. He said the EU was giving Britain six more months "to find the best possible solution" to its Brexit impasse.
Like many things related to Brexit, the extension was a messy compromise. May came to an emergency summit in Brussels seeking to postpone Britain's departure from the EU until June 30. Some European leaders favored a longer extension, while French President Emmanuel Macron was wary of anything but a very short delay.
Leaders of the 27 remaining EU member states met for more than six hours over a dinner of scallop and cod before settling on the end of October, with the possibility of an earlier Brexit if Britain ratifies a withdrawal agreement.
May said the possibility of leaving before the deadline was a key request of hers.
"I continue to believe we need to leave the EU, with a deal, as soon as possible," she told reporters.
She noted that if U.K. lawmakers back her Brexit deal, Britain could still leave by June 30 — the Brexit deadline she had requested from the bloc — and possibly as soon as May 22, which would release Britain from having to participate in elections for the European Parliament.
May spoke to the 27 EU leaders for just over an hour, before they met for dinner without her to decide Britain's fate. In contrast to some testy recent summits, there were signs of warmth, even humor. May and German Chancellor Angela Merkel were filmed laughing over a tablet bearing an image showing the two of them speaking to their respective Parliaments on Wednesday while wearing similar blue jackets.
While many leaders said they were inclined to grant a Brexit delay, Macron expressed reservations, warning as he arrived at the summit that "nothing is decided."
Afterward, the French president said he was satisfied with the outcome.
"We did the best possible compromise to preserve the unity of the 27 (other EU members) because we have left the United Kingdom more time to deliver a deal," Macron said.
Tusk said that during the extension Britain "will continue its sincere cooperation as a full member state, with all its rights, and as a close friend and trusted ally in the future."
Several months have passed since May and the EU struck a deal laying out the terms of Britain's departure and the outline of future relations. All that was needed was ratification by the British and European Parliaments.
But U.K. lawmakers rejected it — three times. As Britain's departure date of March 29 approached with no resolution in sight, the EU gave Britain until Friday to approve a withdrawal plan, change course and seek a further delay to Brexit, or crash out of the EU with no deal to cushion the shock.
Economists and business leaders have warned that a 'no-deal' Brexit would lead to huge disruptions in trade and travel, with tariffs and customs checks causing gridlock at British ports and possible shortages of goods.
The Confederation of British Industry said the Brexit extension means an "imminent economic crisis" has been averted for now.
After all, all options from a 'no-deal' Brexit to a general election to no Brexit at all remain on the table.
May has previously said that "as prime minister" she could not agree to let Britain stay in the EU beyond June 30, and has promised to step down once Brexit is delivered. Many Conservative Party lawmakers want a new leader to take charge of the next stage of Brexit. But they can't force her out until the end of the year, after she survived a no-confidence vote in December.
Several days of talks between May's Conservative government and the main opposition Labour Party aimed at finding a compromise have failed to produce a breakthrough. Labour favors a softer Brexit than the government has proposed, and wants to retain a close economic relationship with the bloc. The two sides said they would resume their discussions Thursday.
Pro-EU politicians said the next few months should be used to hold a new referendum on whether to leave the EU or remain. Scottish National Party Nicola Sturgeon said in a tweet after the extension was granted that the British people should be allowed to "decide if they still want to leave."
Irish Prime Minister Leo Varadkar said the time had come for Britain to decide what it wants.
"We're giving them a very long time to take a decision," he said.
"You know, the European Union is not a prison. Nobody has to stay but it is also a home and we are not going to kick anyone out."
As to the symbolic end date? He said it was not on the minds of the EU leaders.
"As I learned this evening, Halloween is not a holiday widely celebrated across the European Union," Varadkar said.
Katz reported from London. Associated Press writers Mike Corder and Angela Charlton in Brussels and Danica Kirka in London, and Sylvie Corbet in Paris contributed to this report.