Hartford — Senate debate stretched late into the night Friday on legislation that would legalize marijuana in Connecticut for medical purposes.

The bill, which last week passed in the House on a vote of 96 to 51 and has support from the governor, permits only pharmacists to dispense marijuana from a set number of approved “dispensaries,” and only licensed, in-state producers to grow it.

Only adult patients who suffer from one of a dozen specific debilitating conditions would be eligible to obtain the drug. The state Department of Consumer Protection would oversee the new, strict regulatory framework.

Sixteen states and the District of Columbia have passed medical marijuana laws.

State senators took up the bill around 4:30 p.m. and were still discussing it six hours later, although proponents claimed they had the votes to get it passed.

The lead opponent, Sen. Toni Boucher, R-Wilton, held the floor for nearly five hours, delivering an on-off, filibuster-style monologue on the health, mental and societal dangers of marijuana use. At several points in the evening, she read snippets from news articles from around the world on marijuana.

“The abuse inherent in the bill cannot be prevented,” Boucher said. “Reclassifying marijuana as medicine does provide a false impression that it is benign, and does increase its use.”

But other senators said they were comfortable with the safeguards in the bill and were ready to support it.

Sen. Andrea Stillman, D-Waterford, said she opposed a 2007 bill that involved home-grown medical marijuana, but planned to vote “yea” on Friday. “I think there are far better controls written in this bill,” she said. “The dispensaries themselves will be closely watched and there can only be so many, so you’re not going to see a proliferation of them.”

Stillman said she has received multiple inquiries from constituents who are in pain and interested in marijuana as a palliative. The bill “will make their lives more comfortable and less painful,” she said.

Under the bill, individuals must gain a doctor’s permission and have one of the following conditions to be eligible for marijuana: cancer, glaucoma, HIV or AIDS, Parkinson’s disease, multiple sclerosis, epilepsy, post-traumatic stress disorder, Crohn’s disease, cachexia wasting syndrome, or damage to the nervous tissue of the spinal cord.

Patients could obtain up to a one-month supply of marijuana, an amount determined by future guidelines to be developed by an eight-member board of physicians.

Sen. John Kissel, R-Enfield, said he would vote for the bill based on the moving public testimony from individuals who suffer from painful and life-limiting ailments who have found relief only through marijuana.

“As I look out into this circle, I don’t see just the state seal and the red rug, I see the dozens and dozens of people who came and testified before our committee for hours and hours,” Kissel said. “I would not wish any of those illnesses on the worst of my enemies ever, and how these men and women, young and old, can keep a positive attitude in the face of these challenges is beyond me.”

During the hours-long jeremiad, Boucher pointed out how marijuana is still illegal under federal law and cited the recent opinion from Connecticut U.S. Attorney David Fein that state legalization wouldn’t necessarily protect marijuana dispensaries and growers from federal law enforcement raids and prosecution.

State lawmakers approved medical marijuana legislation in 2007 that was later vetoed by then-Gov. M. Jodi Rell. That bill called for patients to grow marijuana at home.