Swiss voters are split down the middle on whether to curb immigration by European Union citizens, a polling agency has said, in a referendum seen as a crunch test of the country's ties with the 28-member bloc.

Based on a combination of partial results and estimates, the gfs.bern public opinion institute said the result appeared too close to call. It estimated that 50% of voters had backed either side in the referendum, with a margin of error of 3%.

The vote on a measure crafted by the rightwing populist Swiss People's party is being watched closely by eurosceptics within the EU who want to rein in immigration among member states, notably from eastern to western Europe.

If passed, the measure would bind the Swiss government to renegotiate within three years a deal with Brussels that since 2007 has given most EU citizens free access to the country's labour market.

The populists say that with 80,000 EU citizens arriving each year – rather than the 8,000 predicted before the rules were liberalised – it is time to rein in immigration.

Their opponents, including the government and lobby groups from across the economy, say immigrants are needed to drive Swiss business and industry, and that ripping up the free movement deal would mean the demise of a handful of related economic accords with the EU.

The measure needs more than 50% of the vote to pass, as well as a majority of Switzerland's 26 cantons.

The labour market accord is part of a raft of deals signed with the EU in 1999 after five years of talks, approved by Swiss voters in 2000 and phased in. Its supporters say Switzerland's credibility as a negotiating partner would be ruined if it ripped up the rules. They also argue that restricting the hiring of EU citizens would act as a brake on the Swiss economy, which enjoys virtually full employment but has an ageing population.

The treaty with the EU allows Switzerland to reimpose temporary quotas – something it has deployed to control numbers of workers from the EU's ex-communist member states. But the quota clause expires this year.

Brussels says Switzerland cannot pick and choose from the binding package of deals negotiated in the 1990s, seen as a way for the country to enjoy the benefits of access to the EU market without membership.

Pascal Sciarini, a political scientist at the University of Geneva, said: "If the yes camp wins, there will be total chaos and a huge period of uncertainty in relations with the EU."

The centrist MP Hans Gruender said a yes vote could also have a domestic impact, with a government reshuffle possibly on the cards. Switzerland is governed by a cabinet including the Swiss People's party and four parties opposed to the measure.

The Swiss political system gives the people the last word on a huge range of issues, and referendums are common. The populists mustered more than 135,000 signatures to force a vote.

They argue that EU citizens undercut Swiss workers, and that overpopulation has driven up rents, stretched the health and education systems, overloaded the road and rail networks and eaten into the landscape due to housing construction.

In a nod towards such concerns, the government recently adopted measures making it harder for newly arrived EU citizens to apply for Swiss social security.

Over recent years the proportion of foreigners has risen from around one-fifth of the Swiss population to roughly a quarter. The majority of recent immigrants are from neighbouring Germany, Italy and France, as well as Portugal.