The European Union formalized Britain’s third delay to its Brexit departure date on Tuesday, pushing back the October 31 deadline by up to three months and preventing the country from crashing out without a deal on Friday.

“The EU27 has formally adopted the extension. It may be the last one. Please make the best use of this time,” European Council President Donald Tusk wrote in a tweet to “my British friends.”

Britain was originally due to leave the European Union on March 29, but negotiated a series of extensions in the hope of gaining the support of the British parliament for a withdrawal deal negotiated with Brussels.

Earlier this month, British Prime Minister Boris Johnson secured key changes to the Brexit agreement initially struck by his predecessor, Theresa May. However, parliament refused to wink the deal through, forcing Johnson to request a Brexit extension.

The remaining 27 member states agreed to the request on Monday, after it became increasingly likely that Johnson would succeed in holding a general election in December.

All EU capitals had to give their formal approval for the extension to become binding, in a process completed Tuesday.

Britain’s new Brexit deadline is January 31. Under the terms of the extension, however, it will leave the EU on December 1 or on January 1 if the withdrawal agreement has been ratified by the British and the European Parliaments by then.

The withdrawal deal regulates the terms of Britain’s departure, giving both sides time to negotiate their future relationship.

Without it, EU laws would cease to apply to Britain overnight, likely leading to uncertainty and chaos on both sides.