ST. PAUL, Minn. (AP) — Minnesota Democratic Gov. Mark Dayton sent a letter to state lawmakers Friday saying he would be willing to sign medical marijuana legislation the House has passed.

Dayton’s letter came shortly after the House’s 86-39 vote for a bill that would legalize marijuana use for medical reasons but under tighter restrictions than a bill passed by the Senate earlier in the week.

Dayton sent the letter to Minneapolis Democratic Sen. Scott Dibble and Hibbing Democratic Rep. Carly Melin, who sponsored the medical marijuana legislation in their respective chambers. Dayton said components that made the House measure superior included an observational study, consumer assistance and fewer dispensaries.

The Senate reconvenes on Monday. Its options are to accept the House version or open conference committee negotiations. If the two chambers reconcile their differences and Dayton signs the bill, Minnesota would become the 22nd state, plus the District of Columbia, with some form of legalized medical marijuana.

After the vote tally in the House, families looking on pumped their fists and broke into a round of hugs. Angie Weaver stood by her 8-year-old daughter, Amelia, who suffers from a rare form of epilepsy.

“I feel like Minnesota is going to do this,” she said. “It’s going to change my daughter’s life.”

The legislation allows medical pot in pill, oil and vapor form to patients from three state dispensaries.

Representatives such as Tony Albright, R-Prior Lake, became emotional as they explained why they would vote to support legalization. Albright converted from an initial “no” to an ultimate “yes.”

He described seeing a group of young children recently gathered in the Capitol rotunda.

“If that was my son or daughter and they wanted something to ease their pain so they could eat, so they could sleep through the night, so they could see Thanksgiving or Christmas one more time…” Albright said, pausing often to compose himself. “It’s weighing heavily on each of us: How do we do the right thing?”

“People often want to avoid this topic because it’s not easy,” said Melin, who added that some preferred to tackle it next year. “But the fact of the matter is the families, patients and kids — they can’t wait until next year.”

But Rep. Bob Barrett, R-Lindstrom, voted against legalization and raised concerns about allowing such use of the drug.

“This is one of the most used and abused illegal substances in the country, and a lot of people want it,” Barrett said.

Neither the House nor Senate proposals allows smoking the drug, which law enforcement officials say could lead to more illegal recreational use of marijuana. Both chambers empower the state health commissioner to add to the list of maladies allowed to be treated by medical marijuana.

The House bill identifies eight conditions that would qualify, with a possible ninth if the health commissioner acts on a House amendment requesting that “intractable pain” be considered as a justification. The Senate proposal includes a few more maladies.

Unlike the Senate measure, the House bill does not require a photo-identification card. Instead, patients would receive an identification number if a doctor, a physician assistant or advanced-practice registered nurse certified a qualifying illness existed.

The House legislation also establishes a research study.

Law enforcement opposes the Senate bill but was neutral on the House bill before Friday’s debate and amendments. The Minnesota Medical Association this week called the House proposal “a more useful, measured approach.”

The Senate measure would establish 55 dispensaries throughout the state.

Medical marijuana legislation appeared to be dead earlier this session. Dayton made his support largely conditional on the acquiescence of law enforcement, but police and prosecutors were firmly opposed.

The governor later said he was moved by advocates’ appeals that only marijuana could help some children and adults with debilitating diseases, and Dayton offered a plan for research and clinical trials of the drug for children. His proposal, which stopped short of legalization, angered some advocates who said they couldn’t wait years to treat their children.

Dayton then challenged lawmakers to tackle the issue, and legislation began moving ahead in both chambers.