A Dutch court has upheld a law banning foreigners from entering "coffee shops" to buy marijuana and hashish, the BBC reported on Friday.
The legislation will go into effect in three southern provinces next month and will be enforced across the Netherlands by the end of the year.
A group of coffee shop owners has opposed the move, arguing that the ban was discriminatory against tourists. A lawyer for the coffee shop owners said he would urgently file an appeal.
Cannabis is technically illegal in the Netherlands but possession of less five grams of the drug was decriminalized in 1976. Government officials and police have many times expressed concerns that many tourists are visiting the Netherlands solely to buy drugs, which are then resold in other countries.
Some politicians in Dutch border towns claim drug tourists frequently create nuisances like traffic jams and an increase in dealing of hard drugs on the streets.
Coffee shop owners say tourism in cities like Amsterdam will decline sharply if the ban is enforced.
There are more than 700 marijuana cafes in the Netherlands, the BBC says.