ROME — Italian officials warned Monday that Switzerland could face consequences after voters in the border canton of Ticino approved a referendum calling on authorities to grant preference to Swiss workers over foreigners in employment.

Fifty-eight percent of Ticino voters on Sunday approved the measure, an outgrowth of the Swiss nationalist efforts to limit European Union workers in Switzerland.

While the referendum had no practical effect, “Swiss-EU relations are at risk without free circulation of people,” Italy’s foreign minister, Paolo Gentiloni, said on Twitter.

Switzerland is not a member of the EU, but it is part of the Schengen passport-free zone and the ability of EU citizens to move freely in and around Switzerland is enshrined in a 1999 agreement. More broadly, EU-Swiss relations are governed by dozens of accords that cover issues ranging from agriculture to taxation.

In an ironic twist, the most vocal Italian critic of the Swiss result was Roberto Maroni, leader of Italy’s anti-immigrant Northern League. He complained that the vote would harm Italians who work in Ticino and vowed to protect their rights.

The EU’s executive commission has been working with Switzerland for several months to find a way to apply a Swiss referendum from 2014 setting immigration limits, and the Ticino referendum has only complicated matters.

The “vote will not make the already difficult talks any easier,” European Commission spokesman Margaritis Schinas said.

Schinas said the EU’s so-called “four freedoms” — the free movement of goods, capital, services and people — are inseparable and that any future agreement with Switzerland would have to take that into account.

The agreement also would have to be endorsed by all EU member countries.