Minnesota will become the 23rd state to legalize recreational marijuana for adults under a bill passed by the Senate and sent to the governor's desk early Saturday.

DFL Gov. Tim Walz has pledged to sign the measure, which passed the House on Thursday. Lawmakers said it will take a year or longer for retail dispensaries to open, but marijuana possession will be decriminalized and home growing of cannabis legal as of Aug. 1.

"The war on drugs has had devastating, harmful effects on our communities," Sen. Lindsey Port, a Burnsville Democrat who sponsored the bill, said Saturday. "It is time. Minnesotans are ready. Let's legalize, regulate and expunge."

The DFL-controlled Senate voted 34-32 along party lines to pass the bill just before 1:30 a.m.

Nearly every Republican senator voted against it; one abstained. They raised concerns about public health and safety effects, among other things.

"I really think this is going to harm Minnesota like nobody understands," said Sen. John Jasinski, R-Faribault. "Not one law enforcement agency, not one law enforcement person will tell you this is going to benefit our state."

Once the commercial market is set up, Minnesotans age 21 or older will be able to buy up to 2 ounces of cannabis flower, 8 grams of concentrate and 800 milligrams of edible products at a time, and possess those amounts in public.

Starting this summer, they also will be allowed to grow up to eight cannabis plants at home, but no more than four can be mature and flowering at a time. Minnesota will be the 11th state to allow home growing.

Legislators set the tax rate for cannabis products at 10% and capped home possession of marijuana flower at 2 pounds — a much higher limit than other states — assuming that people who grow their own could yield a sizable harvest.

Sen. Jordan Rasmusson, R-Fergus Falls, took issue with the 2-pound home possession limit, saying it could fuel the illicit market.

"Law enforcement wanted lower limits so that they could help crack down on the illicit market, but that was turned away," Rasmusson said. "You can have up to 2 pounds in your home. That was another thing that law enforcement expressed concerns around."

The bill creates the Office of Cannabis Management to oversee licensing of recreational and medical marijuana and hemp-derived products.

The state's medical marijuana providers will continue operating as normal during the regulatory transition. Most existing rules regarding hemp-based THC drinks and edibles will also remain in place until newly created license requirements kick in.

Cities will have the option of limiting the number of cannabis retailers within their limits but will not be able to ban them. The state will begin working in August to automatically expunge past misdemeanor marijuana convictions from Minnesotans' records while setting up a board to consider expungement of felony-level cannabis crimes.

Sen. Clare Oumou Verbeten, DFL-St. Paul, said the bill will ensure that "the folks most harmed by the cannabis prohibition benefit from legalization." She said the state will seek to undo those harms by expunging records and giving "social equity applicants" a better shot at getting a cannabis business license.

Social equity applicants include people convicted of possessing or selling marijuana, family members of someone convicted of a marijuana offense and residents of neighborhoods that "experienced a disproportionately large amount of cannabis enforcement," according to the bill. Those applicants would be prioritized for business licenses and be eligible for special grants created by the legislation.

"You deserve to be at the top of the line for the licenses," Verbeten said. "Others don't just get to skip ahead when you're the ones who lost jobs and you lost housing and educational opportunities.

"You are the ones who suffered from prohibition and we're just not going to let folks profit off of this new market before you."