The Swiss government hopes to negotiate for a right to cap immigration from the European Union so as to keep its access to EU markets when it writes into law a popular vote requiring strict limits on migration.

The referendum passed narrowly almost a year ago despite vehement opposition from the government and from the Swiss banks, drugmakers and other industries that rely heavily on skilled workers from the EU.

This handed the government the problem of how to manage immigration through quotas without angering Brussels, which has said any curb on the influx of EU workers would violate treaties that give Switzerland access to EU markets.

Berne diplomats are now exploring adding a “safeguard clause” that would let Switzerland cap immigration from the EU once certain levels were hit, according to two sources familiar with the matter who declined to be named.

Curbs would be imposed when immigration tops a number that is linked to average immigration in the European Union, but also allows for outliers.

Foreigners made up almost 24% of the Swiss population at the end of 2013, one of the highest proportions in any Western economy, up from below 15% 30 years ago. Net immigration is about 1% a year, about twice that of Germany.

The proposal is meant to reassure Swiss voters that a perceived siege by foreign workers will be tackled, while persuading the EU that one of its fundamental principles, free movement of labour, has not been compromised.

Although Switzerland is not in the EU, it has in effect accepted those principles in exchange for market access.

The government’s proposal has gained support from the business establishment, but will be hard to sell to the right-wing Swiss People’s Party (SVP), which launched the referendum.

“We want a bill that adheres to the constitutional change, and it doesn’t seem that adding a safeguard clause would do so. It does not set quotas or give priority to Swiss residents,” Silvia Baer, deputy secretary of the SVP, told Reuters on Wednesday.

The EU said it would not take a view until it received an official proposal. Two diplomats familiar with the matter said it would be very hard for the bloc, currently dealing with its own pressures to limit internal migration, to stomach the safeguard clause.

Other proposals for responding to the referendum have ranged from re-running it in the hope of reversing the narrow “Yes” vote to taking a hard line and risking breaking the treaties.