MINNEAPOLIS— Minnesota lawmakers on Friday approved legalizing medical marijuana in pill or liquid form for a limited number of patients suffering from severe or fatal illnesses.

Minnesota senators voted 46-16 and representatives 89-40 to approve the measure with bipartisan support and send it to Gov. Mark Dayton, who has said he will sign it into law.

More than 20 U.S. states, including Maine, have approved medical marijuana and cannabis programs, according to the National Conference of State Legislatures.

Opponents of the bill said they were concerned it could lead to wider use of marijuana in Minnesota, particularly among children, and serve as a first step toward legalization of the drug for recreational use. Colorado and Washington state both havelegalized marijuana for recreational use and other states are considering legislation.

“This is not about moving down the path to recreational use,” said state Sen. Scott Dibble, a sponsor. “This is about getting something into the hands of people who now lack it, who have no other available options that are any good at all.”

Senators and representatives approved separate bills earlier in May and the final version was based on a House proposal for an observational research study of medical cannabis.

Enrollment is not capped, but the state health department has estimated participation at about 5,000 people. The Minnesota Medical Association remained neutral on the approved bill.

Medical marijuana would be available starting July 1, 2015. The measure permits two manufacturers of medical cannabis and eight distribution points around the state.

The measure allows the use of whole plant extracts, but not the leafy plant itself. Patients would be allowed to vaporize the cannabis but would be prohibited from smoking it.

Patients would have to be diagnosed with one of several conditions to apply to the state for enrollment in the program. Minnesota will collect data on how patients respond to the drug.

Conditions covered include cancer that is causing severe or chronic pain, severe vomiting or wasting; seizures including epilepsy; glaucoma; multiple sclerosis and other disorders that cause severe muscle spasms; amyotrophic lateral sclerosis; HIV; AIDS; and Crohn’s disease.

People suffering from terminal illnesses also could enroll if they are suffering from chronic or severe pain, vomiting or wasting. The health commissioner also could expand the list of covered diagnoses.