The latest legal challenge to Theresa May’s Brexit plans threatens to put a cat among her pigeons. It is based on the argument that leaving the EU does not automatically mean that we quit the single market because we are a member of that by virtue of a completely separate treaty – the Agreement on the European Economic Area. The EEA treaty creates a single market encompassing EU states and three non-EU ones – Norway, Iceland and Liechtenstein.

If it’s true that leaving EU doesn’t mean we quit EEA too, the prime minister may struggle to take us out of single market. A successful legal challenge could even scupper plans to take us out of EU – as people may conclude they would prefer to stay in the bloc when they compare full membership of the EU with being in the EEA.

The nub of the legal challenge, being launched by the think-tank British Influence, is that the UK is a contracting party to the EEA treaty. This is clearly stated at the top of the treaty. As such, the UK can only leave the EEA – and hence the single market – if it follows the divorce process set out in that treaty. It’s not enough to trigger Article 50 of the EU treaty. It needs to trigger Article 127 of the EEA one, which reads: “Each Contracting Party may withdraw from this Agreement provided it gives at least twelve months’ notice in writing to the other Contracting Parties.”

The government disputes this legal reasoning. A spokesman was quoted by the BBC as saying: “As the UK is party to the EEA Agreement only in its capacity as an EU Member State, once we leave the European Union we will automatically cease to be a member of the EEA.”

But the government’s confident statements about legal matters have already been shown wanting. Earlier this month, the high court ruled that it doesn’t have the right under the royal prerogative to trigger Article 50. Unless it can convince the supreme court that it is correct, it will have to ask parliament for permission.

British Influence plans to seek judicial review of the government’s position on the EEA. Such a challenge, which would probably start in the high court, could conceivably be referred to the European Court of Justice – and take a long time to come to a conclusion.

May can of course short-circuit the process by triggering Article 127 of the EEA treaty. But unless she wins the Article 50 case, she will presumably have to ask parliament’s permission in this situation too. And that won’t be nearly as easy given that there probably isn’t a majority in the parliament or in the country to quit the single market – as this could badly damage our economy.

Hard-line Brexiters argue that the latest legal challenge is a wheeze to try and frustrate the will of the people. Conservative MP Dominic Raab told the BBC: “The public have spoken; we should respect the result and get on with it, not try to find new hurdles that undermine the democratic process.”

But this is misleading. The people voted for Brexit, but not to quit the single market. MPs may therefore feel emboldened to vote against a bill authorising May to trigger Article 127 of the EEA treaty while they won’t have the courage to stop her invoking Article 50 of the EU treaty.

There’s even a possibility that the government may come round to the idea of staying in the EEA, at least for a few years after we quit the EU. This is because it would stop the economy falling off a cliff. While staying in the EEA is not the only way of achieving this, negotiating an alternative transitional agreement will be tricky. John Kerr, the former head of the foreign office who was responsible for drafting Article 50, thinks the chance of agreeing one is less than 50/50.

However, staying in the EEA is not a magic potion. Brexiters would rile at the fact that we would still have to allow free movement of people and follow the EU’s single market rules. We would also probably have to pay money towards EU projects – though it’s unclear how that would be negotiated if we never left the EEA in the first place.

But the real problem is that we would be following the EU’s regulations without a vote on them – moving from being a rule-maker to a rule-taker. That’s hardly taking back control. In other words, EEA membership is clearly inferior to full EU membership. If the voters realised that, they might wonder what’s the point in quitting the EU in the first place.

Hugo Dixon is co-founder of CommonGround as well as editor-in-chief of InFacts. You can sign up as a supporter here.