The last 24 hours will have huge implications for Brexit, with major news from the House of Commons and the European Court of Justice that will shape what happens to Britain in the coming months.

Here’s a rundown of everything that happened, and what it means for Brexit – and the vote next week on Theresa May’s deal.

What happened at the European Court of Justice?

(REUTERS) (Reuters)

At the European Court of Justice, the court’s advocate general said Britain has the power to unilaterally revoke Article 50 – that is cancel Brexit – if it wants to. Whether the UK had this power or not has been disputed, and campaigners had asked judges to rule.

This isn’t a final legal ruling by the court, but judges usually endorse what the advocate general suggests. We should find out if this recommendation is confirmed within the coming weeks, with 17 December one date that is being talked about in Brussels.

If it is confirmed, an accidental no-deal Brexit is effectively taken off the table – the government would be able to stop it in all circumstances if it wanted to.

This is significant because the government’s main argument to remainer MPs to get them to support Theresa May’s deal has been that if they don’t, a disastrous no-deal Brexit could happen without anyone wanting it to. In one respect, the decision makes it harder for May’s deal to pass, because she won't be able to scare them into backing it.

Meanwhile, in Westminster

(AFP/Getty Images) (AFP/Getty)

As the news from the Luxembourg court broke in the morning , MPs were settling in for a big day in Westminster. By the time they went home for the night, the Government had been defeated in three votes – a record bad day for Theresa May’s minority administration.

One of these votes was about whether the Government was in contempt of parliament for refusing to release its legal advice about its Brexit deal. MPs decided that ministers were indeed in contempt – effectively forcing the government to release the legal advice. This is significant because the advice is expected to provide more ammunition for opponents of the deal, especially Brexiteers.

The Grieve amendment

Tory MP Dominic Grieve (AFP/Getty Images) (AFP)

But another vote lost by the government will likely have even bigger implications. MPs – including 26 Tory rebels – voted to give parliament more power if Theresa May’s deal is voted down.

If the deal is voted down next Tuesday the Government has 21 days to come back to Parliament and lay its plan for what happens next. But under the successful amendment tabled by Tory Remainer Dominic Grieve, the Commons will also be able to vote on what it wants the Government to do. Though that vote wouldn’t technically be binding, it would be politically incredible for the Government to ignore it.

Taken together with the likely ECJ ruling that the UK has the power to stop Brexit if it wants, MPs would be expected to take no-deal off the table. They might also call for a so-called ‘plan B’ – a call for Theresa May to go back to Brussels and negotiate a different deal. Whether that would be successful is another matter.

So what are the implications for Brexit?

Theresa May faces a crunch vote next week (Parliament Live)

The overall effect of the events of Tuesday 4 December are to make a no-deal Brexit significantly less likely. Nobody thinks there is a majority of MPs in favour of a no-deal, and they will now control the Government’s response to its deal being defeated.

If the ECJ decides that the UK does have the unilateral power to revoke Brexit, then no-deal is effectively off the table. But even if it doesn’t it’s unlikely member states would stand in the way and push Britain off the cliff.

In one sense, the deal is also less likely to pass because of what happened: Remainers were being encouraged to vote for it on the basis that a no-deal might happen.

But in a strange way, the deal might win more support – if Brexiteers decide that the defeat of the deal might mean Brexit not happening at all, they could swing behind it. A large number have already publicly said they will vote against it, however – so whether that will be enough remains to be seen.

Is that everything that happened?

Nigel Farage (EPA)

No, that’s just the main thread. Plenty more happened that would have been big news on any other day.

Nigel Farage also announced he was leaving Ukip – the party he has long been synonymous with – because of its increasing closeness to far-right activist Tommy Robinson.

The BBC dropped out of plans to host a debate on Brexit between Jeremy Corbyn and Theresa May after the three sides couldn’t agree on a format.

The Pound fell to an 18-month low after the Government lost the contempt vote, but then rebounded.