THE European Court of Justice (ECJ), a stately place populated by robed judges, eager clerks and artworks depicting clunky legal metaphors, seems an unlikely place for a coup. But it is here, “tucked away in the fairyland Duchy of Luxembourg”, wrote Eric Stein, an American academic, that the court “fashioned a constitutional framework for a federal-type structure in Europe”. This line has resonated with the many critics that the court, the supreme judicial authority in the European Union, has attracted. British Eurosceptics in particular have seen in the ECJ a political project shrouded in legal obscurantism that poses a deep threat to the ancient sovereignty of their courts and MPs.

Now that Britain has voted to leave the EU, liberation from the shackles of Luxembourg ranks second only to control of immigration in the Brexiteers’ hierarchy of needs. That explains why Theresa May, the prime minister who will shape the terms of Britain’s departure, has vowed to take the country out of the ECJ’s jurisdiction. “We will not have truly left the European Union,” she said recently, “if we are not in control of our own laws.”

In one respect, this is trivial. The ECJ is the court of the EU; quitting the club means leaving the court’s purview. But examine another of Mrs May’s stated aims—to retain the “greatest possible access” to the EU’s single market after leaving it—and her principles begin to look more like a predicament.

To understand why, consider what the court actually does. Its critics have often focused on a string of rulings in the 1990s that elucidated and expanded the rights of Europeans to live and work across the EU. (More recently, the court has restricted EU migrants’ rights to benefits.) They have watched with concern as EU treaties have expanded the court’s responsibilities. Since 2009 the Charter of Fundamental Rights has been invoked in a series of data-privacy cases, including the “right to be forgotten” ruling, under which individuals can force search engines to remove links to embarrassing or defamatory websites. The coming weeks may see big decisions on humanitarian visas, religious headwear at work, and EU sanctions on Russian oil firms.

Less well known is the regular churn of ECJ rulings that keep the EU’s single market chugging along, including the right to trade as freely across borders as within them. The 1963 Van Gend en Loos case, beloved by EU law students, involved a Dutch haulage firm hit with duties on imports from West Germany. Later came a crucial ruling obliging West Germany to let a French blackcurrant liqueur be marketed as such. Such prosaic cases hardly resonate with citizens the way Supreme Court rulings like Roe v Wade do in the United States. But they helped build the single market, still the EU’s singular achievement, as much as any law or treaty.

This market is so important that the court’s rulings extend deeply even into non-EU countries that seek close access to it. “The influence of our case law on third partners is very, very big,” says Koen Lenaerts, the president of the ECJ. Norway, Iceland and Liechtenstein, the three non-EU members of the European Economic Area, are governed by rulings of the EFTA court, which closely follows the ECJ. Swiss law is nominally independent, but in practice courts tend to track Luxembourg because Switzerland is so deeply integrated into EU markets. Voters periodically grumble about the influence of “foreign judges”. But no Swiss government has seen fit to do anything about them.

What does all this mean for Britain? It depends on the trade deal Mrs May secures with the EU, but anything short of autarky means the country will never be entirely free from the court’s clutches. At a minimum, any British firm trading with the EU will need to understand relevant ECJ rulings. Companies doing business in the single market must abide by EU competition rules, as American giants like Microsoft and Google have learned. The ECJ will probably supervise any post-Brexit transitional arrangements. And it can be called on to scrutinise any trade deal signed by the EU. Mr Lenaerts has said there are “many different ways” in which his court might be asked to confront Brexit.

But Mrs May’s “greatest possible access” implies something more. The closer the trading relationship, the more need for harmonised or mutually recognised regulations and a body to oversee it all. The ECJ supervises the European Common Aviation Area, for example, which opens European skies to all-comers. Someone will have to monitor the legal “equivalence” that would allow British financial-services firms to trade inside the single market. And although Mrs May’s misnamed “Great Repeal Bill” will incorporate the entire acquis into British law after Brexit to ensure legal continuity, “EU law is premised on the EU system of remedies,” notes Catherine Barnard, a law professor at Cambridge University. Luxembourg may not be so easy to shake off.

Booing the referee

Mrs May’s government accepts the need for some sort of dispute-resolution mechanism. But the relevant section in its White Paper, the best guide there is to British priorities, “lacks any real content,” says Ms Barnard. No option looks ideal. Joining the EFTA court, as its president has urged, would break the spirit of Mrs May’s pledge to quit ECJ jurisdiction. The EU is sick of the complexity of the Swiss deal and will hesitate to do anything similar in its legal arrangements with third parties. And any attempt to create a new sort of judicial tribunal risks incurring the wrath of the ECJ itself. The court has been known to strike down attempts by EU governments to set up alternative centres of legal power.

By the end of March, Mrs May will trigger Article 50 of the EU treaty, kicking off two years of Brexit negotiations. As the talks proceed, the crystalline certainties of the Brexit campaign will give way to difficult trade-offs and hard choices. Some think the prime minister’s insistence on ditching the Luxembourg court may start to look a little rash. Britain may think it has lost interest in the ECJ. But the court may well retain an interest in Britain.