Minnesota is set to become the 22nd state in the U.S. to legalize medical marijuana, but it will come with hefty restrictions.

Gov. Mark Dayton said last week he will sign the legislation. The restrictions will not allow medical marijuana users to grow their own plants or even smoke the substance. Instead, they'll be able to use the drug in oil, pill or vapor form.

The bill will allow two places in Minnesota to manufacture medical marijuana and eight dispensaries to distribute it. Some advocates are upset about the restrictions against smoking the drug. Minnesota explicitly said that medical marijuana cannot be smoked. It is the only state to have this provision. Other states don't have that language in their medical marijuana policies.

"People in Minnesota who are suffering today who have no good options or options at all can have the hope of gaining some relief," Sen. Scott Dibble said during a news conference. 

While some advocates are happy that marijuana is being allowed for medical use in Minnesota, opponents are saying it's a step closer to recreational legalization.

"The voices that weren't represented during this debate were the parents who have lost children to drug abuse, in which marijuana played a part," Sen. Bill Ingebrigtsen, R-Alexandria, said. 

He added that children will likely begin to think that, since marijuana is legal for medical purposes, it is okay for them to use it too.

"It's just like alcohol and tobacco. We haven't done a very good job keeping those out of the hands of children. We're legalizing the third killer in Minnesota," he said. 

So far, eight medical conditions including AIDS, cancer and glaucoma would be qualifying conditions for medical marijuana.

Medical marijuana in Minnesota would be closely tracked. Patients given the authorization to seek medical marijuana will be given an identification number, and they'll need to pass a background check before receiving medical marijuana.

Medical marijuana systems could be up and running by next summer in Minnesota.