A Commonwealth Court judge on Wednesday allowed Pennsylvania medical marijuana companies to resume selling vapes that were taken off the shelves in February in a controversial recall.

“We are thrilled about this decision,” said Judith D. Cassel, an attorney for a group of cannabis companies that sued state regulators in February, alleging that the recall was unfounded.

“The vapes can go immediately back on the shelves, and the grower processors can continue or commence producing these vapes,” said Cassel, a partner at Hawke McKeon & Sniscak LLP in Harrisburg.

The ruling is a blow to the Pennsylvania Department of Health, which in February mandated a massive recall and ban of 670 types of cannabis concentrates for vaping — 330,000 units — that they had previously approved for sale in Pennsylvania’s more than 150 marijuana dispensaries.

Vaping involves an electronic device that heats a liquid form of cannabis to create a vapor or aerosol that the patient breathes in.

The move blindsided patients and an industry dominated by companies hyper-focused on broader legalization of marijuana. And regulators declined to explain the action beyond saying the medicines contained “added ingredients that have not been approved for inhalation” by the FDA.

Some of the companies involved formed a group called Medical Marijuana Access & Patient Safety Inc. to fight the recall in Commonwealth Court. They said that regulators exceeded their authority and that the recall was based on a de facto new regulation that was invalid because it didn’t go through proper channels before the Health Department put it into effect.

Commonwealth Court Judge Michael J. Wojcik agreed. On June 2, he granted a preliminary injunction overturning the recall because the group was likely to win a permanent injunction and because the group would suffer immediate and irreparable harm without it, he said.

The next day, the Health Department filed a notice of appeal to the Pennsylvania Supreme Court, automatically staying the preliminary injunction. On Wednesday, Wojcik suspended that automatic stay, allowing the companies to resume selling the cannabis products.

The Health Department said it was continuing its appeal.

The additives at issue are natural chemicals called terpenes taken from other plants and fruits. They are used to restore flavors and aromas that the concentrate extraction process destroys.

Some medical marijuana companies use terpenes from cannabis in their concentrates — which the Health Department allows even though they also are not approved for inhalation by the FDA. Particular terpenes, such as limonene, are chemically identical whether they come from lemon rind or from cannabis.

Wojcik was not impressed that the state did not call witnesses during the preliminary injunction hearing in February. Regulators “failed to present any evidence to the court of potential harm to medical marijuana patients due to the recalled products, or more specifically due to the addition of terpenes to these products,” he wrote in his 27-page opinion.

The companies involved in Medical Marijuana Access & Patient Safety, including Curaleaf Holdings Inc., Jushi Holdings Inc., and Trulieve Cannabis Corp., said they were facing more than $17 million in collective losses from the recall. Some products have already expired, they said.