In one of the most important rulings in its history, the European Court of Justice (ECJ) on Tuesday gave the European Commission broad powers to negotiate trade deals without the approval of each member state. This is likely to make Brexit negotiations much easier than expected, but the final deal - if there is one - worse for Britain.
Formally, the ruling has to do with the European Union's free trade agreement with Singapore, signed in 2013.
The court decided that only its provisions that concern portfolio investment and arbitration between investors and states fall outside the competence of the European Commission, which negotiates trade deals on behalf of the member states.Since those provisions are there, the Singapore deal requires the ratification of member states. The commission has the power to negotiate everything else - the movement of goods and services, transport, direct investment, intellectual property and antitrust rules.
The unexpected decision - the court went against the opinion of its advocate general, which only happens in about a third of cases - opens up an exciting prospect for Britain.
Before the ruling, it had to assume that it would have to wait years before any Brexit agreement reached with the commission could come into effect, and any EU member state could derail it. All the countries have different ratification procedures, and in a number of them, a referendum may be called on a major trade deal.
In August 2014, the EU concluded talks on Ceta, a comprehensive trade agreement with Canada. It's still not in effect. Last year, the regional Parliament of Wallonia in Belgium nearly killed the deal because legislators claimed it would be bad for local farmers. This is not going to happen to any Brexit deal now, if only the parties agree to keep portfolio investment and conflict resolution out of the talks. That's a small sacrifice to make for clarity on the future relationship between Europe and Britain.
Ceta negotiations began in 2009 and took five years until the parties were satisfied - but Britain is an EU member now and standard harmonisation efforts may not be as time-consuming.
Does this, however, make a good deal more likely for Britain? That's doubtful.
The commission needs only a qualified majority to reach a trade deal so it no longer needs to look quite so much over its shoulder at national governments as it negotiates Brexit. That makes life easier for Commission President Jean-Claude Juncker and chief Brexit negotiator Michel Barnier, who have made it clear they want to serve Britain with a large divorce bill and harsher terms.
There are member states that would like a softer Brexit - Ireland, Denmark, Cyprus and Poland, for example - but they aren't particularly influential behind the scenes compared with France and Germany.
So it seems that the ECJ has handed a more valuable gift to the commission and the hardline countries than to Britain. Could that, perhaps, have something to do with one of Britain's negotiating priorities - getting out from under the ECJ's jurisdiction as soon as possible?
Be that as it may, once Brexit is over, with or without a deal, the EU will from now on have an easier procedure for concluding trade agreements - something that could one day allow it to make a deal with the United States as German Chancellor Angela Merkel and former US president Barack Obama once dreamed, before political developments both in Germany and the US scuppered the plan.