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.