Swiss voters have defeated a nationalist initiative to tear up their free-movement agreement with brussels, deciding by a large majority to maintain existing ties with the eu.

A referendum proposal from the rightwing populist swiss peoples party (svp) to end free movement for eu citizens was comfortably rejected, preliminary results showed, with about 62 per cent of the electorate voting against.

The vote was a key test of sentiment ahead of complex negotiations between switzerland and the eu over a new treaty defining their future relationship. the bern government had campaigned against the nationalist initiative, warning that it would damage vital economic ties and void existing treaties.

The eu-swiss negotiations have been complicated by brexit, with brussels highly reluctant to cede ground to switzerland, in case london demands similar concessions.

Switzerland, for its part, must agree a package which is saleable to the entire swiss population. under the countrys idiosyncratic and highly devolved political structure, any new treaty with the eu would be subject to a national referendum.

A vote to end the free movement of citizens between the eu and switzerland would have torpedoed the talks on a new framework agreement. about 1.4m of switzerlands 8.5m residents are eu nationals.

Even absent a victory, the size of the yes vote will be closely assessed in bern. with about 38 per cent of voters supporting the initiative more than the electorate of the svp the government in bern is likely to be far more cautious in what it agrees to with brussels. that will in turn irritate the eu and lead it to increase pressure on the alpine state for a deal.

Sundays results nonetheless suggest a significant shift against the anti-immigration politics of the svp, which have been a leitmotif of swiss politics for the past two decades.

The party, which is still the largest in switzerland, lost seats in last octobers parliamentary elections for only the second time since 1975.

Just six years ago, the svp scored an unexpected victory on immigration when swiss voters opted to narrowly support a 2014 referendum calling for free-movement agreements with brussels to be abandoned. deft legal footwork by the government managed to avoid the full implementation of the vote, much to the anger of the svp and its supporters.

Pollsters suggested the svp had overplayed its hand in this weekends referendum. its proposal would have meant a unilateral end to free movement for eu and swiss citizens across the countrys borders, and would have immediately voided six other crucial bilateral treaties.

Despite widespread concern over immigration and sovereignty, swiss voters are wary of taking hardline ideological positions, pollster lukas golder told the financial times ahead of the results, because of how the uks painful brexit negotiations with europe are playing out.

National referendums are a crucial part of the swiss democratic model, with several held every few months. four other issues were voted on this sunday, including the institution of paid paternity leave and the authorisation of sfr6bn ($6.5bn) in funding to acquire new fighter jets for the swiss air force. a contract for the aircraft has yet to be awarded.