In this April 21, 2018, file photo a budtender displays a jar of cannabis at the High Times 420 SoCal Cannabis Cup in San Bernardino, Calif Credit: Richard Vogel / AP

HARTFORD, Conn. — The Connecticut Senate on Thursday gave final legislative approval to a bill that allows for the cultivation and sale of marijuana in the state.

The measure would allow adults 21 or older to purchase and possess up to 1.5 ounces of marijuana (or up to 5 ounces locked away at home or in a vehicle’s glove box or trunk) starting on July 1. Retail sales of recreational cannabis in Connecticut would not start until May 2022, at the earliest.

“I look forward to signing the bill and moving beyond this terrible period of incarceration and injustice,” Gov. Ned Lamont said in a written statement shortly after the vote.

Connecticut is now the 19th state, plus the District of Columbia, to legalize cannabis for non-medical use.

The legislation, which passed the Senate by a vote of 16 to 11, aims to undo the historic damage that the criminalization of cannabis has done to Black and brown people, said Sen. Gary Winfield, a Democrat from New Haven and one of the architects of the bill. He noted that the debate came on the anniversary of President Nixon’s June 17, 1971, speech declaring drug abuse as “public enemy number one.”

“We have operated for 50 years with unjust laws that target certain communities,’’ Winfield said. “We should never have done that.”

Thursday’s vote marked the third time in 10 days that the Senate has approved marijuana legalization. The sweeping, 300-page bill contains a number of provisions, from setting limits on THC content to funding programs to address addiction and mental health.

But lawmakers were tripped up over the “social equity” section, which is designed to provide those hurt by the prohibition of marijuana to have an expedited opportunity to enter the potentially lucrative market.

A threatened veto by Lamont over an equity provision that gave preference to those previously arrested on a marijuana-related charge sent the measure back to the Senate a third time on Thursday. As the bill reads now, people from cities that have borne the brunt of the war on drugs will qualify for expedited licenses, not whether or not they have a criminal record.

Though the equity provision was a key sticking point, there were other objections as well. Republicans expressed concern about the impact of legalization on children.

“It’s obviously accessible in the state of Connecticut,’’ said Senate Republican leader Kevin Kelly. “Legalization is going to make it that much more available … it’s going to be easier to get into the hands of our youth and it’s going to have a negative impact on their health.”

But Senate President Pro Tempore Martin Looney said prohibition of marijuana hasn’t worked. “From some of the debate we’ve seen for the three times we’ve addressed this issue, it would seem that we’re going to be unleashing a new product that would be harmful to society. But the reality is it is already here,’’ he said.

Legalizing cannabis will allow the state to control it, Looney said. “We have to recognize human nature here,’’ he said. “We will have a regulated product, a taxed product and a system for use by adults as we have for tobacco, as we have for alcohol.”

The bill would require warning labels for cannabis products with varying THC content and would allow “home growers” to cultivate up to three mature plants and three immature plants. It would also bar state lawmakers from entering the legal marijuana market for two years after they leave office.

Efforts to legalize cannabis for recreational use have stalled at the Capitol for years. The legislature decriminalized the possession of small amounts of marijuana more than a decade ago and in 2012, the state established a medical marijuana program.

But even as neighboring states fully legalized marijuana, the issue languished in the Connecticut legislature; former Gov. Dannel P. Malloy was a critic of the idea.

Lamont, a Democrat who was elected in 2018, strongly supported legalization. “The states surrounding us already, or soon will, have legal adult-use markets,’’ he said. “By allowing adults to possess cannabis, regulating its sale and content, training police officers in the latest techniques of detecting and preventing impaired driving, and expunging the criminal records of people with certain cannabis crimes, we’re not only effectively modernizing our laws and addressing inequities, we’re keeping Connecticut economically competitive with our neighboring states.”