A Massachusetts judge in the case challenging Gov. Charlie Baker’s temporary vape ban ordered that patients with medical marijuana certificates be allowed to continue vaping cannabis flower, but isn’t lifting the ban on those products.

“Given the serious harm to medical marijuana users who are deprived of demonstrably effective cannabis products to alleviate severe pain, as well as the availability of ground cannabis flower as a vaping product that reduces exposure to oils and additives, the balance of harms therefore favors some relief,” Suffolk Superior Court Judge Douglas Wilkins wrote in an order issued Thursday.

But vaping equipment associated with vaping ground cannabis, and the “display and sale” of such products, would still be part of the ban. After the state’s Public Health Council voted to issue an emergency regulation in compliance with a prior court order, a spokesperson for Baker’s office confirmed that flower vapes will continue to banned.

The ruling follows Wilkins’ denial of a motion by plaintiff Vapor Technology Association to lift the emergency four-month ban on Monday. As part of that ruling, the state must now heed existing law by taking a series of regulatory steps it skipped when issuing the ban to ensure compliance by December 24.

The state must reissue the ban in compliance with those regulations by Oct. 28, otherwise the sale of nicotine vape products will be allowed to continue.

After Monday’s decision, the court heard testimony from medical marijuana patients and advocates, who intervened in the case. The plaintiffs and the state unsuccessfully appealed the case.