Last week, the Swiss government proposed a “safeguard clause” to limit EU immigration. British Eurosceptics’ ears pricked up: the proposal sounds remarkably like Downing Street’s “emergency brake” proposal, which David Cameron eventually backed away from in his immigration speech in November. Many within Ukip and the Conservative party would like Britain to withdraw to a Swiss-style relationship with the EU, which they hope would allow them to pick and choose. Should the Swiss succeed, British Eurosceptics will ask: if they can limit immigration from central and eastern Europe, why shouldn’t we?

There are several parallels between the Swiss and the British. Both are geographically separated from the rest of Europe – the Swiss by mountains, the British by water – while being economically and politically entangled with it. Both countries have received increasing numbers of immigrants in the past 15 years, especially from the EU. They have a fractious relationship with the EU, carefully weigh the economic costs and benefits of integration, and are sceptical of grand projects (an approach that might have better served those countries that signed up to the euro). And the way both countries’ psychodramas over immigration and the EU have played out is very similar.

In February 2014, in a referendum called by the rightwing People’s party, the Swiss voted to impose quotas on immigration from the EU, which would mean tearing up a 1999 agreement to allow free movement. The government has three years to negotiate a deal with the EU – which means a deadline in 2017.

Like Cameron, who is disappointing Eurosceptics with the timidity of his reform programme, the Swiss have been forced to accede to the realities of negotiating with a much bigger player. The EU stopped Swiss scientists from being able to receive grants from the EU’s Horizon programme as a first shot across the bows, and said they would only be able consider the Swiss case once they heard some details.

After a year of deliberation, the country’s government has come up with a more modest proposal to close the border if immigration from the EU runs higher than an as-yet-unspecified threshold. It has proved unwilling to be specific in public about its plans: if the government demanded a threshold that was high, the Swiss people would feel cheated – but if it was low, the EU would never accept it. The same dilemma faces Cameron. He rejected the idea of a safeguard clause – a kite that senior Conservatives had flown for him before his immigration speech – after Merkel made it plain that she would not accept any limits on the freedom of movement, although the EU would listen to proposals to restrict migrants’ access to benefits. And Brussels will – and should – play hardball with the Swiss to discourage the British, as well as France, Sweden and Denmark who are having similar anxieties about European migration.

This isn’t just stubbornness, or a federalist insistence on integration for its own sake. The EU is simply a grand bargain, in which member-states hope to offer up sovereignty for mutual benefit. This requires that the demands of poorer countries, which have migrants who want to profit from their labour, be balanced with those of richer ones, which have export sales and investments that they can profit from in poorer countries. If a country seeks to withdraw from some parts of the bargain that it does not like, there must be consequences, or the whole thing will unravel.

And migration is probably the biggest benefit in a club beset by economic problems that are largely of its own making. It is the policy the EU should be most proud of: for central and eastern Europe, it is the biggest advancement of liberty since the fall of the Berlin Wall. Central and eastern Europeans’ incomes can triple by moving to the UK – and the evidence shows that they do negligible damage to low-skilled Britons’ employment prospects. A stream of young, well-educated, easy-to-integrate and hard-working people does wonders for western European countries’ public finances, and helps to fill jobs as baby boomers retire.

The EU has the whip hand with the Swiss, and should use it. The EU should demand that unless Switzerland agrees to full free movement rights, as laid down in an agreement signed in 1999, the EU will no longer be bound by its provisions either. The member-states should be willing to make Swiss migrants go through their non-EEA immigration route in order to have access to their labour markets. And if the Swiss still refuse to back down, the EU can take the nuclear option of invoking the “guillotine” clause in its treaties with Switzerland. This gives it the right to suspend all economic agreements – trade, scientific co-operation, public procurement and so on – if Switzerland reneges on one agreement.

Switzerland, as a sovereign nation, has every right to withdraw from treaties when it likes. So too does the UK – it can withdraw from the EU at any time. But neither should pretend that there will not be serious collateral damage from an attempt to pick and choose.