Minnesota has approved the sale and use of medical marijuana and Gov. Mark Dayton has said he will sign the legislation.

The state is poised to become the 22nd to legalize the drug for medical purposes.

Minnesota Public Radio says, "Under the agreement, the state will authorize two medical cannabis manufacturers to set up operations in Minnesota and distribute the product in pill or liquid form to qualified patients at up to eight distribution centers by July 1, 2015."

However, smoking marijuana would still not be legal. Instead, patients would be allowed to vaporize "whole plant extracts," but not dried leaves, MPR says.

The Associated Press says the deal is "a major victory to severely ill children and adults whose emotional appeals for help propelled a major policy change that once appeared dead for the session."

The AP says: "Some patients lamented that the agreement doesn't allow them to use actual plant material - they instead can use the drug in oil, pill and vapor form - but others were overjoyed."

MPR reports:

"The bill calls for a state patient registry and an observational study of the effect cannabis in treating a limited list of qualified conditions, including cancer, glaucoma, HIV/AIDS, Tourette Syndrome, Crohn's Disease, ALS and seizures."Law enforcement groups that opposed earlier proposals, are taking a neutral position on the new compromise. The Minnesota Medical Association also took a neutral stand."Copyright 2016 NPR. To see more, visit http://www.npr.org/.