After nearly 10 hours of debate, the Senate voted 21 to 13 in favor of the measure, which has already cleared the House.
Gov. Dannel P. Malloy, a Democrat, is expected to sign the bill. Once he does, Connecticut will join 16 other states and the District of Columbia in allowing the medical use of marijuana.
Connecticut’s legislation calls for tight regulation and seeks to avoid disagreements with the federal government.
Under the bill, patients and their caregivers must register with the Department of Consumer Protection.
In addition, their doctors must certify that there is a medical need — for instance, debilitating diseases like cancer, glaucoma, AIDS, Parkinson’s, multiple sclerosis or epilepsy — for marijuana to be dispensed.
The medical marijuana would be dispensed only by pharmacists with a special license.