Germany’s cabinet passed a contentious bill to legalize recreational marijuana use and cultivation, potentially giving further momentum to a worldwide trend to liberalize cannabis laws.

The legislation, which still has to pass parliament, would allow adults to possess up to 25 grams of the drug, grow a maximum of three plants, or acquire weed at cannabis clubs.

The centre-left government of Chancellor Olaf Scholz hopes the law will curb the black market, protect consumers against contaminated marijuana and lessen the workload for the justice system.

If the bill passes parliament, Germany will become one of the countries with the most liberal cannabis laws in Europe.

However opposition is fierce, with policymakers from the opposition conservatives in particular warning that it will foment marijuana use and the new legislation will create even more work for authorities.

Moves by governments to legalize the recreational use of marijuana have led to increased consumption and cannabis-related health problems, a U.N. narcotics watchdog said in March.

Scholz’s government already watered down original plans to allow the widespread sale of cannabis in licensed shops nationwide after consultations with Brussels.

Instead, it said would launch a pilot project for a small number of licensed shops in some regions to test the effects of a commercial supply chain of recreational cannabis on public health, the protection of minors and the black market.

For that, it will need to present separate legislation in a second phase.

Many countries in Europe have already legalised cannabis for limited medicinal purposes, including Germany since 2017. Others have decriminalized its general use.

Malta became the first European country to allow limited cultivation and possession of cannabis for personal use in late 2021.

The legislation presented on Wednesday includes strict rules for growing weed – cannabis clubs of up to 500 associates must have burglar proof doors and windows, with greenhouses fenced off. Associates will not be allowed to smoke weed at the clubs or in the vicinity of schools, nurseries, playground or sports grounds.

It is up to the regional governments of Germany’s 16 states whether they allow such clubs.