Rhode Island became the 19th state to legalize adult-use recreational marijuana when Gov. Dan McKee signed the measure Wednesday afternoon.

This came a day after the General Assembly cleared a related bill by wide margins.

The state Senate passed the legalization bill, 32-6. In the House of Representatives, following a two-hour debate, the legislation was approved, 55-16.

Supporters, including House sponsor Rep. Scott Slater (D-Providence) said the bill will generate state revenue, keep the money from migrating to Massachusetts and ensure a safe product for consumers.

Rep. David Morales (D-Providence) called the legislation a model effort because, he said, it grew out of a collaborative process and includes social equity elements to help people hurt by the war on drugs, including plans for automatic expungement of some past charges.

“This is a detailed policy that other states across the country will reference as a best practice and a leading example when they decide to take the steps to finally legalize cannabis,” he said.

Opponents cited a variety of concerns.

Some pointed to how only a small number of police officers across Rhode Island are trained in recognizing marijuana intoxication. Others argued that while many people can use marijuana without ill effect, a small percentage can be adversely impacted. Some cited concern about the fallout for workers using heavy equipment or in Rhode Island’s defense sector.

Rep, Barbara Ann Fenton-Fung (R-Cranston) pointed to a lack of resources in the state for treating substance use and mental health problems -- issues, she said, likely to worsen with legal marijuana use.

“We talk about all these problems and this bill does not have the guardrails necessary to kind of stop and say, ‘hey look, we’re in a better place.’ ”

Once the bill is signed, Rhode Islanders can possess up to one ounce of cannabis on their person, or up to 10 ounces in their home, without legal consequence.

The bill calls for the creation of a new Cannabis Control Commission, led by three gubernatorial appointees, to oversee the introduction of legalization and select licenses for 24 new retail shops, half of which will go to worker cooperatives or social equity applicants.

Rhode Island legalized medical marijuana in 2006. Existing medical marijuana dispensaries (some are still in the process of opening under previously awarded licenses, bringing the total number to nine) can begin selling cannabis to non-medical customers as of December 1.

Advocates celebrated the news.

“With this legislation passing, I think about the tens and thousands of Rhode Islanders who will finally get relief from the collateral consequences of a past criminal legal record, particularly for an activity that is now soon to be legal,” said Cherie Cruz, Co-founder of the Formerly Incarcerated Union of RI.