ST. PAUL, Minnesota (AP) — Surrounded by dozens of cheering people in green clothes, Minnesota Democratic Gov. Tim Walz signed a bill Tuesday to legalize recreational marijuana for people over the age of 21 starting in August, making Minnesota the 23rd state to legalize the substance for adults.

“This has been a long journey with a lot of folks involved,” Walz said.

Among them was one of the first governors in the U.S. to openly support marijuana legalization.

“For me personally, it’s very wonderful to see a dream of yours over 20 years ago finally happen today, and I’m still alive to see it,” said Jesse Ventura, Minnesota’s governor from 1999-2003.

Under the new law, cannabis will be legal by Aug. 1 to possess, use and grow at home. Possession of cannabis flower will be limited to 2 pounds (0.9 kilograms) at home and 2 ounces (56 grams) in public. Other possession caps include 800 milligrams of THC in gummies and other edibles and 8 grams of cannabis concentrate.

Retail sales at dispensaries will probably be at least a year away. Once licensed, stores will charge sales tax plus a 10% cannabis tax.

Minnesotans who have been convicted of misdemeanor or petty misdemeanor possession will also get their records automatically expunged. However, the Bureau of Criminal Apprehension has estimated it will take until August of next year to process all cases. Others with more serious convictions, such as those with possession offenses that exceeded even the new limits, may also be able to apply for reduced sentences.

Expunging criminal records of those charged with marijuana-related offenses is one of the most important pieces of the legislation, Democratic Sen. Lindsey Port, of Burnsville, said at the ceremony. It ensures “that we are undoing some of the harm that we have done as a state through the prohibition of cannabis,” she said.

Supporters of the legislation have said it will improve public health and safety and further social justice, while opponents have said health and safety will worsen. Supporters have largely been Democrats, and opponents have largely been Republicans this session.

Democrats took full control of state government when the Legislature convened for its 2023 session, marking the first time in eight years they have held the “trifecta” of the Senate, House and governor’s office. With that power, they passed a long list of legislative priorities — including legalization — that the previous Senate Republican majority had blocked.

Walz has long been a supporter of legalizing recreational marijuana for adults. In 2021, the Democratic-controlled House passed a legalization bill with several Republicans voting yes, but the GOP-controlled Senate never gave it a vote.

Last year, the Legislature passed a bill legalizing THC in edible or drinkable form if it’s derived from hemp. Many lawmakers apparently didn’t realize what they were doing as it sailed through under the radar. Low-strength gummies and beverages have been on sale since July.

Former Gov. Ventura said in November that Walz had called him up the day after his reelection and said he expected a new legalization bill to pass. Ventura, an independent who doesn’t usually make endorsements, backed Walz over Republican Scott Jensen, and said legalization was one of the many reasons why.