Florida’s ban that prevents medical marijuana patients from smoking their cannabis has gone up in smoke.

Leon County Circuit Court Judge Karen Gievers on Friday ruled that a state’s ban on smokable cannabis is unconstitutional. Florida’s Department of Health said in a statement it has appealed the ruling, which will impose an automatic stay.

Gievers wrote in her 22-page ruling that Floridians “have the right to use the form of medical marijuana for treatment of their debilitating medical conditions as recommended by their certified physicians, including the use of smokable marijuana in private places.”

Ben Pollara, who runs the nonprofit medical marijuana advocacy group Florida for Care, said the ruling is a big victory for patients and voters.

Taylor Patrick Biehl of the Medical Marijuana Business Association of Florida added that “despite legislative pushback over interpretation and ideologies, justice has been served.”

Voters approved a constitutional amendment in 2016 allowing the use of medical marijuana. The only mention of smoking in the amendment’s language and in an intent document during the 2016 campaign was that the Legislature and local governments could restrict it in public places.

The Legislature last year passed enacting laws that banned the sale of smoking products, citing a health risk. The laws, signed by Florida Gov. Rick Scott in June, say patients can use cannabis through vaping and in food, oils, sprays and tinctures.

John Morgan, who led the push to legalize medical marijuana Florida, filed a lawsuit challenging the ban two weeks after Scott signed the bill. He was joined in the suit by two patients with terminal illnesses who benefit from smokable medical pot.

Cathy Jordan, who has had ALS since 1986, says smoking the plant dries her excess saliva, increases her appetite and works as a muscle relaxer.

Diana Dodson, who has had HIV since 1991, testified May 16 that vaping is 50 percent less effective than smoking and that smoking allows her to get the proper dosage.

Jordan said that when she was diagnosed with ALS — amyotrophic lateral sclerosis — doctors thought she would live only three to five more years. She credits smoking with helping to prolong her life, and has been supported by her physicians.

“So many people won’t smoke due to the stigma and it being against the law. This is legitimate medicine,” she said by phone from her Manatee County home after the ruling. “This ruling is not just for me but for many other people.”

Bob Jordan, Cathy’s husband, said he was still in shock after getting the call about the ruling.

“A little woman with ALS took on the state and won. That’s an amazing thing. It is kind of surreal,” he said.

He tweeted after the ruling that “truth prevails.”

Florida Department of Health spokesman Devin Galetta said in a statement that the ruling “goes against what the legislature outlined when they wrote and approved the law to implement the constitutional amendment that was approved.”

The next stop will be the state’s 1st District Court of Appeal in Tallahassee. It will be the second medical marijuana case that court will be taking up after Gievers ruled last month that a Tampa man — Joseph Redner — is entitled under state law to possess, grow and use marijuana for juicing. Redner was prescribed juicing treatments from his doctor to prevent a relapse of stage 4 lung cancer.