The sale of marijuana in Dutch coffee shops will be restricted to local residents under a new membership scheme which starts to roll out next week / AP

Court ruling means foreign visitors will no longer be able to get their fix of marijuana

Thirty-six years and many millions of joints after the Netherlands' laws on marijuana were relaxed, drug tourists from Britain and other countries are set to be weeded out when a nationwide ban on foreign dope-smokers takes effect.

Yesterday, a court in The Hague upheld a Dutch government plan to restrict sales of soft drugs to local residents in possession of an identity card, nicknamed a "wietpas", or "weedpass".

Since 1976, Dutch authorities have tolerated the sale and consumption of small quantities of soft drugs. The policy was introduced to keep users away from the hard drugs trade, controlled by organised criminals. One consequence was to attract visitors from less-tolerant countries to a land where joints could be rolled, bongs inhaled and "space-cakes" nibbled, without fear of prosecution.

In most European countries, the commercial landscape around major railway stations tends to be much the same: a hotel or two, a late-night shop and perhaps an internet café. But stations in many Dutch towns and cities often have a "coffee shop" nearby. As with prostitution, these premises are licensed and health standards are strictly enforced: smoking tobacco is banned.

Visitors arriving at Amsterdam's Central Station need walk no more than five minutes to find coffee shop after coffee shop openly selling a compendium of cannabis in various grades and strengths. Many are seedy places in the red light district. But one of Amsterdam's main squares – Leidseplein, close to the Rijksmuseum – is dominated by the upmarket Bulldog coffee shop, which is building an international franchise to the extent that laws allow it.

Amid the sober graphs of population growth in the Amsterdam History Museum is a diagram of the rise of coffee shops in the last two decades of the 20th century, using the marijuana plant as the symbol of magnitude. Proprietors take pride in their range of stock, with the finest grades of hash selling at €10 per gram or more. Small coffee shops keep the drugs menu on or behind the bar, larger ones sell from a separate booth.

Fearing border cities and the capital are becoming defined by drugs tourists, and that gangs are illegally exporting cannabis from Holland, the Dutch government wants to ban foreign visitors from buying drugs from the start of next year. Before that, coffee shops in the south – where many customers are from neighbouring Belgium and Germany – must become "members only".

From 1 May, each will be limited to 2,000 members with identity cards showing them to be local residents. But Marc Josemans, chairman of the Association of Official Coffee Shops in Maastricht, sees no need for the change, telling BBC Five Live: "No other country in the whole world has such a low amount of people who die from abusing drugs."