The U.K. and the European Union will have only days to ratify any post-Brexit trade agreement—if they manage to reach one this week.

After their negotiating teams strike a deal, both sides will begin a race to approve the accord formally before the post-Brexit transition period expires at 11 p.m. London time on Dec. 31.

In Britain, Prime Minister Boris Johnson has promised lawmakers a vote, and hasn’t ruled out holding one on Christmas Day. In Brussels, the process is more complex, involving the bloc’s 27 national governments as well as the European Parliament.

There’s a remote chance the process could be delayed by a last-minute intervention by an EU leader like French President Emmanuel Macron, or by opposition in the European or British parliaments. If a deal isn’t approved in time, it could be applied provisionally, pending parliamentary approval—or Britain could be left facing a spell outside the EU without a trade deal.

Here are the steps to ratifying any deal:

In Europe:

  • Because of its political importance, any agreement is likely to be reviewed by the EU’s 27 leaders. They are expected to arrange a meeting, probably by video, as soon as a deal is struck.
  • EU lawyers will have to decide if any parts of the accord must be approved by national and regional parliaments across the bloc, something that would be the case if parts of it touch on member states’ national sovereignty. Officials stress, however, that they don’t expect this to delay the implementation of any accord.
  • The European Parliament has a veto. Its committees will scrutinize the text before the whole 705-seat assembly votes on it. Depending on when the deal is struck, that could happen at an extraordinary session during the week of Dec. 28.
  • Once the EU Parliament has given its consent, the bloc’s Council, which represents member states, gives its final approval. By this stage, it should be a formality and the deal would simply be signed off without discussion.

In the U.K.:

  • Parliament will need to give its approval. A bill can be published within 48 hours, so if Johnson announces a deal on Dec. 17, MPs could be discussing it early the following week. A bill can become law within one day, but all sides would have to agree not to alter it, so the government may need to allow for a few days’ debate.
  • Jacob Rees-Mogg is the minister in charge of the parliamentary timetable. He has refused to rule out a Dec. 25 sitting, which would be the first since 1656. If Johnson doesn’t reach a deal this week, lawmakers are on standby to be recalled from their vacations to sit on Dec. 28.
  • Even so, the normal procedures, which would see 650 MPs troop through the division lobbies, won’t apply because of the coronavirus pandemic. Government and opposition “whips” -– party officials responsible for shepherding their lawmakers to vote in the correct way—will vote on behalf of MPs via a proxy system.
  • If Johnson’s deal looks, to Brexit purists, like a sell-out, some MPs may insist on turning up to vote against it. However, with opposition Labour Party leader Keir Starmer all but promising to back any deal, it’s likely any accord will pass in the nick of time.