The European Union on Monday agreed a 3-month flexible delay to Britain’s departure from the bloc as Prime Minister Boris Johnson pushes for an election after opponents forced him to request an extension he had vowed never to ask for.

Just days before the United Kingdom is formally due to leave the EU on Oct. 31 at 2300 GMT, Brexit is hanging in the balance as British politicians are no closer to reaching a consensus on how, when or even if the divorce should take place.

Johnson, who became prime minister in July by pledging, “do or die,” to deliver Brexit on Oct. 31, was compelled to request a postponement after he was defeated in parliament over the sequencing of the ratification of his divorce deal.

The 27 countries that will remain in the EU after Brexit agreed on Monday to put off Brexit until the end of January with an earlier departure possible should the faction-ridden UK parliament ratify their separation deal.

“The EU27 has agreed that it will accept the UK’s request for a Brexit ‘flextension’ until 31 January 2020,” European Council President Donald Tusk said in a tweet, referring to the idea of a “flexible extension.”

EU member states will need Britain to formally reply to its offer of a 3-month delay before launching a “written procedure” whereby governments will have 24 hours to accept or reject.

“We can only launch the written procedure when we have the agreement of the UK government on the text,” a senior EU official said. Johnson is obliged by legislation passed by parliament last month to accept an extension once offered.

Johnson will respond to the EU’s delay offer once he has reviewed the details, his spokesman said on Monday.

Two senior EU diplomats confirmed that the written procedure period agreed was 24 hours, effective from the time London accepts the offer of a Brexit delay from Oct. 31 to Jan. 31.

Britain’s departure has already been delayed twice – from March 29 and April 12 – after Johnson’s predecessor, Theresa May, failed three times to get her deal ratified by parliament.

With British politics still paralyzed over carrying out Brexit 3-1/2 years after a 52%-48% referendum vote in favor of Leave, Johnson is demanding parliament approve an election on Dec. 12 in return for more time to adopt his deal.

But he needs the support of two-thirds of the 650 lawmakers for a new election. A House of Commons vote was due later on Monday.

“Flextension”

The EU, forged from the ruins of World War Two as a way to prevent another devastating conflict in Europe, is fatigued by Britain’s Brexit crisis but keen not to be held responsible for an economically tumultuous “no-deal” Brexit.

French President Emmanuel Macron had been the main hurdle to an extension, arguing there had to be a good reason for a delay and that the British needed to break their own political deadlock. But a source close to Macron said the prospect of an election in Britain had strengthened significantly.

The source stressed that the third Brexit delay would come with conditions, including a refusal to renegotiate the divorce agreement and giving a green light to other EU countries to meet without Britain to discuss the bloc’s future.

An EU diplomat said the hope was that the British would use the postponement wisely. Even though the United Kingdom is set to leave, it will have a legal obligation to nominate a new commissioner for the EU’s powerful executive body.

The latest delay plan envisages that Britain could be out on Dec. 1 or Jan. 1 should parliament ratify the agreement in November or December, respectively, according to diplomats who deal with Brexit in Brussels.

The EU will state that the extension, the third granted so Britain can sort out the details of its departure, will not be used to renegotiate the divorce treaty again, and that London should not impede other essential work by the EU on projects ranging from budgets to climate policies. (Writing by Guy Faulconbridge.)