Mexico’s Supreme Court said on Monday the government and Congress should legalize recreational marijuana use, bringing the country a step closer to creating one of the world’s largest legal markets for the plant.

The decision adds to pressure on the Mexican Senate to approve a sweeping legalization bill that has stalled in Congress after modifications.

Backed by the administration of President Andres Manuel Lopez Obrador, the law would mark a major shift in a country bedeviled for years by violence between feuding drug cartels and potentially open a huge market for U.S. and Canadian weed companies.

“A historic day for freedoms,” Supreme Court Judge Arturo Zaldivar Lelo de Larrea wrote on his Twitter. “The right to free development of the personality is consolidated in the case of recreational or recreational use of marijuana.”

The declaration issued on Monday removes a legal obstacle for the health ministry to authorize activities related to consuming cannabis for recreational purposes, the court said in a statement.

The ruling was the final step in a drawn-out court procedure to declare unconstitutional a prohibition on non-medical or scientific use of marijuana and its main active ingredient THC.

However, in a point criticized by activists, it established that health authorities must initially issue permits for cannabis use.

Only people 18 years and older should be able to grow, carry or consume marijuana and its derivatives, the court said.

In an initial ruling in 2015, the Supreme Court said “the absolute prohibition model entails a disproportionate restriction on the right to free development of the personality of consumers”.