(AP) -- This country of canals and tulips is also famous for "coffee shops" where joints and cappuccinos share the menu. Now, the Netherlands' famed tolerance for drugs could be going up in smoke.
A judge on Friday upheld a government plan to ban non-Dutch residents from buying marijuana by introducing a "weed pass" available only to residents.
The new regulation reins in one of the country's most cherished symbols of tolerance - its laissez-faire attitude to soft drugs - and reflects the drift away from a long-held view of the Netherlands as a free-wheeling utopia.
For many tourists visiting Amsterdam the image endures - and smoking a joint in a canalside coffee shop ranks high on their to-do lists along with visiting cultural highlights like the Van Gogh Museum.
Gavin Harrison and Ian Leigh, from Derry, Northern Ireland, relaxing outside The Bulldog coffee shop in downtown Amsterdam on a stag night said they hoped Amsterdam wouldn't change.
"I think it's going to be a shame for Amsterdam, I think it's going to lose a lot of tourists," Harrison said.
Leigh said he had been visiting Amsterdam for a decade and had noticed the erosion of tolerance over the years.
"It's taking a step back," he said.
Locals agree that their government should not wind back tolerance.
It "is something beautiful, it has something special, it has something that's authentic about the Netherlands," said Nina Fokker.
Her friend Liza Roodhof said barring tourists from coffee shops would drive them into the hands of street dealers.
"If you make it so that tourists can't buy weed in a coffee shop, then they're going to buy it on the street. So you add more problems than you solve," she said.
The city's left-leaning Mayor Eberhard van der Laan is hoping to hammer out a compromise with the national government, which relies on municipalities and local police to enforce its drug policies.
Coffee shops also have not given up the fight. A week ago they mustered a few hundred patrons for a "smoke-out" in downtown Amsterdam to protest the new restrictions.
A lawyer for owners, Maurice Veldman, said he would file an appeal against the ruling by a judge at The Hague District court, which clears the way for the weed pass to be introduced in southern provinces on May 1.
If the government gets its way, the pass will roll out in the rest of the country - including Amsterdam - next year. It will turn coffee shops into private clubs with membership open only to Dutch residents and limited to 2,000 per shop.
The Netherlands has more than 650 coffee shops, 214 of them in Amsterdam. The number has been steadily declining as municipalities have imposed tougher regulations, such as shuttering ones close to schools.
But the new membership rules are the most significant rollback in years to the traditional Dutch tolerance of marijuana use.
The government argues that the move is justified to crack down on so-called "drug tourists," effectively couriers who drive over the border from neighboring Belgium and Germany to buy large amounts of marijuana and take it home to resell. They cause traffic and public order problems in towns along the Dutch border.
Such issues do not exist in Amsterdam, where most tourists walk or ride bikes and buy pot for their own consumption.
The weed pass "doesn't solve any problems we have here and it could create new problems," said city spokeswoman Tahira Limon.
It is not just hardcore potheads taking a toke in the city. Limon said four to five million tourists visit Amsterdam each year and around 23 percent say they visit a coffee shop during their stay.
Therese Ariaans of the Dutch tourism board said it was hard to judge the effect on tourism - it could reduce visits from people wanting to smoke pot but increase tourists previously kept away by Amsterdam's seedy side.
"If the result is that there will be fewer visitors to the Netherlands we would regret that," she said.
Amsterdam argues that the reasons coffee shops were first tolerated decades ago are still relevant today - they are well-regulated havens where people can buy soft drugs without coming into contact with dealers of hard drugs like heroin and cocaine.
Coffee shops also are banned from serving alcohol and from selling drugs to people under 18.
The government in The Hague said Friday there would be no exceptions to the new rules.
"Amsterdam will also have to enforce this policy," said Job van de Sande, a spokesman for the Ministry of Security and Justice.
The conservative Dutch government introduced the new measures saying it wants to return the shops back to what they were originally intended to be: small local stores selling to local people.
However the Dutch government collapsed this week and new elections are scheduled for September. It is unclear whether the new administration will keep the new measures in place.
Coffee shop lawyer Veldman called Friday's court ruling a political judgment.
"The judge completely fails to answer the principal question: Can you discriminate against foreigners when there is no public order issue at stake?" he asked.
Coffee shop owners in the southern city of Maastricht have said they plan to disregard the new measures, forcing the government to prosecute one of them in a test case.
Back in Amsterdam, Leigh hoped the weed pass was a marketing stunt to drum up business.
"It's a recession," he said. "Maybe it's a publicity stunt as well, get people to come over in a mad rush before it happens."
Explore further: Dutch to ban coffee shops from selling 'strong' cannabis