TORONTO (AP) — Canadian Prime Minister Justin Trudeau’s government introduced legislation Thursday to let adults possess 30 grams of marijuana in public — a measure that would make Canada the largest developed country to end a nationwide prohibition on recreational marijuana.

Trudeau has long promised to legalize recreational pot use and sales. U.S voters in California, Massachusetts, Maine and Nevada voted last year to approve the use of recreational marijuana, joining Colorado, Washington, Oregon and Alaska.

The South American nation of Uruguay is the only nation to legalize recreational pot.

The proposed law allows four plants to be grown at home. Those under 18 found with small amounts of marijuana would not face criminal charges.

Officials have said Canadians should be able to smoke marijuana legally by July 1, 2018. The federal government set the age at 18, but is allowing each of Canada’s provinces to determine if it should be higher.

The law also defines the amount of THC in a driver’s blood, as detected by a roadside saliva test, that would be illegal.

The Canadian government closely followed the advice of a marijuana task force headed by former Liberal Health Minister Anne McLellan. That panel’s report noted public health experts tend to favor a minimum age of 21 as the brain continues to develop to about 25, but said setting the minimum age too high would preserve the illicit market.

Canadian youth have higher rates of cannabis use than their peers worldwide.

While the government moves to legalize marijuana, retail outlets selling pot for recreational use have already been set up. Trudeau has emphasized current laws should be respected. Police in Toronto, Vancouver and other cities raided stores earlier last month and made arrests.