Fifty-six per cent of Swiss voters have agreed to extend an accord on the free movement of people to the ten new European Union member states.
The result was clearer than expected and represents a victory for the government. German- and French-speaking areas of the country voted "yes", while Italian-speaking Ticino said "no".
Just seven of the 26 cantons said "no" to opening up the labour market, mainly those in the conservative heartland of central Switzerland.
Approval of the accord was particularly strong in western Switzerland.
Final results showed 56 per cent of voters approving the agreement with 44 per cent against.
Turnout was above average at just under 54 per cent.
Sunday's ballot was the second nationwide vote on Swiss-EU relations this year. In June the electorate came out in favour of closer security and asylum cooperation with Brussels.
The government, which had called for a "yes" vote, welcomed the result.
"In saying yes, Swiss voters have once again confirmed their support for the bilateral path," President Samuel Schmid told Swiss television.
Schmid said Switzerland had taken a step towards opening up, which would help it to remain attractive to business.
But he said he understood the fears of a sector of the population about wage dumping and cheap migrant labour. There would be "a long transition period" as Switzerland opened up its market as well as "strict limits on immigration".
The EU also expressed satisfaction, hailing the outcome as another step towards European integration.
"I warmly congratulate the Swiss decision to extend the benefit of the free movement of people to all inhabitants of the European Union," said European Commission president Jose Manuel Barroso.
"I am delighted by the result which is good for Switzerland and the EU," added Diana Wallis, who heads the EU parliamentary delegation responsible for relations with Switzerland.
The British Member of the European Parliament told swissinfo the winning margin was higher than the EU had hoped for, "which is very encouraging".
Wallis said it was time for Switzerland to decide how it wanted to proceed now with regard to the EU.
"I am not convinced that this very complex relationship of bilateral agreements can be continued in this way," she said. "My personal view is that the Swiss should look at full membership of the EU."
For his part, Schmid said Switzerland would consider later in the year whether to withdraw or continue with its application for EU membership.
The request was lodged in Brussels in 1992, but it was later frozen.
The rightwing Swiss People's Party – the only party in government to oppose the extension of the accord – called on the cabinet to withdraw its membership bid, saying this would be "a logical step".
There was satisfaction and relief at the vote outcome from the Swiss Business Federation, economiesuisse.
"This is a good Sunday for Swiss business," said director Rudolf Ramsauer.
Ramsauer said the Swiss economy would get a boost from the result and profit from the opening up of eastern European markets.
swissinfo with agencies
Final result of Sunday's vote:
Yes: 1,457,807 votes (56%).
No: 1,146,784 votes (44%).
The extension of the treaty on the free movement of people was supported by 19 cantons.
It was rejected by seven cantons.
Turnout was 54%.