Cannabis users in two Dutch cities can smoke legally for the first time as authorities roll out a trial that would expand the country’s tolerance of marijuana to full legality.

“Historic moment,” said the health minister, Ernst Kuipers, on Friday as he scanned the first box of legal cannabis in the Baron coffee shop in the southern city of Breda.

A misconception abroad is that cannabis is already legal in the Netherlands, which is home to the famous coffee shops and seen as a huge draw for cannabis smokers.

In fact, the drug exists in a legal grey area, which the government hopes to stub out with the four-year trial starting in Breda and nearby Tilburg.

The consumption of small quantities of cannabis is illegal but police choose not to enforce the law as part of a “tolerance” policy that has been in place since the 1970s. However, the production of cannabis and its supply to coffee shops is also illegal but this is not tolerated, meaning producers and coffee shop owners have to operate in the shadows.

This has led to gang involvement, with a related rise in petty crime and antisocial behaviour that officials hope to stop if the trial is successful.

“Criminal organisations took over that criminal market and therefore coffee shop owners were depending on the criminal market and that had to stop,” the mayor of Breda, Paul Depla, told Agence France-Presse.

Production will be limited to a handful of farms, whose cannabis will be closely monitored before being supplied to coffee shops.

Consumers would be guaranteed a high-quality product, whereas before it was impossible to know where the cannabis came from, or whether it had been altered.

“The product will be clean, tested, pesticide-free,” said Ashwin Matai, the cultivation director at Holland High farm, which will supply coffee shops legally from February.

The level of THC and CBD, the active ingredients of cannabis, would be measured, so users knew the strength of their joint.

Kuipers said: “From a public health perspective, we had no oversight of the process, we could not do any checks on any potential contamination of the products. Now we can do all that.”

Independent researchers will monitor the trial with a view to eventual decriminalisation.

Asked whether it could lead to legalising other drugs, Depla was cautious. “Let’s start with the legalisation of cannabis and then we can see what will happen because I think some people are also afraid it will … lead to more people being addicted,” he said.

“I think one thing is for sure. Everybody is glad that we can say farewell to the policy, which was hypocritical and not logical.”

One unknown surrounding the planned policy is the Geert Wilders factor, whose far-right Party for Freedom won 37 seats in the general election last month. The party wants to scrap the tolerance policy and push for a “drug-free Netherlands”.