LONDON – After marathon, late-night talks, European Union leaders agreed to delay Britain's departure from the EU, known as Brexit, by six months.
The last-minute extension until Oct. 31 was announced early Thursday in Brussels following an emergency summit. Britain was due to leave the EU on Friday.
The delay is intended to give British Prime Minister Theresa May more time to get her Brexit deal through Parliament. It has been rejected three times already.
It also prevents, for now, Britain leaving the bloc without a formal exit deal.
"I know that there is a huge frustration from many people that I had to request this extension," May told reporters in an early morning news conference.
"The U.K. should have left the EU by now and I sincerely regret the fact that I have not been able to persuade Parliament to approve the deal."
With just two days to go before Britain was due to leave the EU, the leaders of the EU's 27 remaining states met for six hours in closed-door negotiations on Wednesday night and Thursday morning before agreeing on the Oct. 31 deadline: Halloween.
"A treat? First and most importantly, the EU has agreed to put the brakes on. We will not leave tomorrow without a deal," the BBC's Brexit correspondent wrote in a blog post. "There are quite a few potential tricks. This new October deadline might not solve very much at all ... This could ... just make way for months of extra gridlock."
Ahead of the summit, May had requested a shorter, second Brexit extension until June 30 to prevent Britain from leaving the EU without a formal withdrawal deal in place.
She was also hoping to avoid Britain participating in European parliamentary elections.
A potentially calamitous "no-deal" Brexit could cause serious damage to Britain's economy, and risks unleashing chaos on its borders as well as a public health crisis.
But EU leaders feared a shorter delay would only mean more emergency summits and not enough time for May to win over British lawmakers who object to the withdrawal agreement she has negotiated with the EU because they think it risks insufficiently disentangling Britain from the EU on key areas from trade to border policy.
"Please do not waste this time," European Council President Donald Tusk said early Thursday after emerging from the negotiations in Brussels, advising British lawmakers to finally decide on the details of its planned departure from the EU.
Many lawmakers from May's ruling Conservative Party want to renegotiate May's EU withdrawal agreement. The EU has ruled this out.
'No-deal' Brexit: 'Bewildering, dire, disastrous': Queen has a Brexit escape plan
May's Conservatives are continuing to hold cross-party talks with Britain's opposition Labour Party as part of efforts to find a compromise Brexit deal that May would be able to get passed in Parliament. But progress has been slow and lacking in detail.
Some Conservative Party lawmakers have been publicly calling for May to resign. She previously pledged to step down once a Brexit deal with the EU is completed and approved by Parliament. May did not set a date for her departure.
President Donald Trump sided with Britain via Twitter on Wednesday night.
"Too bad that the European Union is being so tough on the United Kingdom and Brexit. The E.U. is likewise a brutal trading partner with the United States, which will change. Sometimes in life you have to let people breathe before it all comes back to bite you!"
This article originally appeared on USA TODAY: European Union delays Brexit until Oct. 31, saving Britain from messy EU exit this week