Swiss voters have overwhelmingly backed a new gambling law which will block foreign betting sites.
The new Gambling Act won the support of 72.9% of voters, according to final results, despite accusations that the law amounts to online censorship.
Due to take effect in 2019, the act, which will be one of the strictest in Europe, allows only Swiss-certified casinos and gaming firms to operate.
The government says it is designed to tackle gambling addiction.
Both houses of parliament have already passed the legislation.
While the bill will let Swiss companies offer online gambling for the first time, it will also block all foreign betting sites in the country, something opponents say amounts to "censorship of the internet".
Various youth wings from political parties garnered the 50,000 signatures necessary to stage the referendum in an attempt to overturn the act.
The government insists the act is necessary to enforce strict rules, like blocking known addicts, to help tackle the problem.
Justice Minister Simonetta Sommaruga said the law would be "indispensable" in the fight, but also said it would allow the government to tax gambling revenue and direct revenues to fund anti-gambling measures.
Gamblers in the country spend roughly 250 million Swiss francs ($253m; £189m) per year on unregulated foreign betting sites, according to the government.
But campaigners say the move will actually cost the government money, as the new law raises the threshold on taxable winnings from 1,000 Swiss francs to 1 million.
Before the vote, Luzian Franzini, co-president of the Greens' youth group, told the AFP news agency that the act set "a very dangerous precedent".
Mr Franzini spoke of a "generation gap" between young voters angry about the law and the lawmakers who passed the law.
"They may not really have understood what this could do to the internet," he said.
Other referendums on Sunday:
- Voters have soundly rejected a new law which would have barred commercial banks from creating money when they lend. More than three-quarters of those who voted rejected the Sovereign Money Initiative, which would have permitted only the Swiss National Bank to create money in the country.
- A bid for the 2026 Winter Olympics was also voted down on Sunday, in a local referendum. Fifty-four per cent of voters in the southern canton of Valais rejected a proposal to pay for the town of Sion to host the games - the fifth time the plan has been put to a vote and turned down by the electorate.