The Swiss parliament has largely caved in to EU intransigence on free movement in a decision that could deal a blow to British government hopes of being able to both control immigration and retain enhanced single market access after Brexit.

Swiss MPs approved legislation on Wednesday that would promote some local preference in job hires, a compromise they hope will allow vital economic relations with the bloc to be preserved following a 2014 referendum vote to cap EU immigration.

The plan, which the upper house will debate in December, should give Switzerland time to work out a more comprehensive deal with Brussels, which has not budged from its stance that quotas on EU workers would automatically exclude Switzerland from the single market.

Both Swiss and EU officials have said the UK’s vote to leave the EU had considerably “complicated” talks between the two sides, since any EU compromise with Switzerland over free movement would be almost certain to fuel similar demands from Britain.

A quarter of Switzerland’s population – about 2 million people – are foreigners, including 1.4 million EU citizens. The plan would encourage employers to give them and local Swiss nationals priority for job openings, and to advertise vacancies at local job centres before recruiting from abroad, in particular economic sectors if net immigration went above average levels in other European countries.

Crucially, the plan does not include any fixed limits to EU immigration, and stipulates that specific EU approval would have to be obtained before any such curbs could be imposed.

The European commission president, Jean-Claude Juncker, said after talks with the Swiss confederation president, Johann Schneider-Ammann, in Zurich on Monday that he could back the proposal as long as a joint EU-Swiss commission approved it.

“This will be possible without a doubt,” Juncker said, although he added that some questions remained. “I am more optimistic than I was in recent weeks.” In an apparent warning to Britain not to read anything into an eventual Swiss agreement, he added that any deal would be tailor-made and “Switzerland-specific.”.

Switzerland’s complex economic and trading relations with the EU are governed by a web of more than 120 bilateral treaties that are all linked by a “guillotine clause” – if one is breached, they all collapse.

The 2014 referendum result must be put into law by February, piling pressure on the Alpine republic to find a way to manage migration without violating its EU obligations and losing its special deal with the EU, which takes more Swiss exports than any other market.

Brussels has not shifted on free movement since the populist, Eurosceptic SVP party called for and, against all expectations, won the 2014 referendum, with 50.3% of voters demanding immigration quotas.

Switzerland has since been ejected from the EU’s science research programme, Horizon2020, and the Erasmus student exchange programme.

“We cannot set a precedent on free movement, especially not now, given the UK situation,” said one EU diplomat. “We can’t have caps or quotas or emergency brakes and single market access. The Swiss have taken a decision and it has certain consequences. They will have to find their own way out.”

Despite Juncker’s positive words, there is no firm guarantee that Brussels will accept the Swiss proposal, which is supported by all political parties except the SVP.

The commission has said it will need assurance it does not discriminate against EU workers. It also wants free movement to be part of a new “institutional agreement” between Switzerland and the EU to replace the bilateral accords.