Brexit is on course to be delayed until the end of October under a plan to avoid a chaotic no-deal split, risking six more months of political uncertainty over Britain’s ties to the European Union.

The blueprint hashed out during six hours of talks in Brussels allows the U.K. to stay in the bloc until Oct. 31, with a review of progress to be held in June. British Prime Minister Theresa May accepted the offer and must now sell it to skeptical members of Parliament in London.

May will need to return to London on Thursday and explain the delay she had previously said would be unacceptable to a Parliament and a Conservative Party that are losing patience with her leadership. While the extension avoids the risk of a disorderly no-deal Brexit on Friday, it sets up a political crisis later on this year and could trigger an immediate backlash that risks destabilizing the government.

"The choices we now face are stark, and the timetable is clear," May told reporters at a news conference shortly before 3 a.m. in Brussels. "I do not pretend the next few weeks will be easy."

The pound was unchanged on the news, as investors had priced in a delay. Diplomats were quick to point out that this might not be the last extension Britain is granted and European Council President Donald Tusk didn’t exclude the possibility.

The Oct. 31 deadline is a compromise and the U.K. can leave sooner if Parliament ratifies the divorce deal. May asked for a short delay until the end of June, but Tusk proposed a delay of as long as a year. At the summit on Wednesday, French President Emmanuel Macron took a hard line -- and a leading role in the discussions -- pushing for a shorter extension and tougher conditions to make sure the U.K. can’t sabotage EU business on its way out.

Britain was due to leave the bloc of 28 member countries on March 29 but May has failed three times to get the divorce deal she negotiated with the EU approved in Parliament. May has already been forced to ask the EU for one delay and reluctantly returned to Brussels on Wednesday to ask for a second short extension to the negotiating period.

She argued that she needed a short amount of extra time to complete the process of cross-party compromise talks with her main opponents, Jeremy Corbyn’s Labour Party. The two sides are having “serious” and “constructive” discussions, May said as she arrived in Brussels.

European Elections

But May’s request has been rebuffed, making it now highly likely that the U.K. will be required to take part in European Parliament elections next month. That’s something the premier and many of her own Conservative Party colleagues have said would be unacceptable three years after Britain voted to leave the EU.

The danger for May is that she will now have to sell a longer delay to a domestic audience than she wanted. That risks a political backlash from critics inside her Conservative Party who believe postponing the U.K.’s departure is a betrayal of the 2016 referendum vote and could even lead to Brexit being canceled.

October is particularly fraught timing: It’s political convention season in the U.K. and if May is still in power she could see her political rivals lining up to showcase their hard-line negotiating credentials in front of pro-Brexit Conservative members.

May conceded that “many people” will be frustrated that the discussions over extending the deadline were taking place at all.

The prime minister is under pressure from pro-Brexit members of her Conservative Party who want her to resign and make way for a new leader. She’s promised to quit once her divorce deal is ratified so a new prime minister can take over and lead the negotiations on the second phase of Brexit -- on the future trade partnership with the EU.

A six-month delay could give May’s Tory critics the time they need to hold a leadership contest to replace her.