BOSTON — A state judge on Monday allowed Massachusetts' four-month ban on the sale of all vaping products to remain in effect but said Gov. Charlie Baker had failed to follow required procedures in enacting the measure.

Immediately lifting the ban as requested by the vaping industry "would contravene the public interest," Suffolk Superior Court Judge Douglas Wilkins wrote in his decision.

But he said unless the state goes through the proper procedure for the adoption of an emergency regulation, which requires a public hearing, the ban will end next Monday.

"Input from affected industries and members of the public is a potent safeguard against executive abuse of discretion," Wilkins wrote.

The Republican governor last month announced a statewide ban on the sale of vaping products in response to lung illnesses and deaths attributed to the use of e-cigarette products.

"We always said that we knew the courts were probably going to be part of this process," Baker said in response to Monday's decision. "But for us the public health issues associated with this outweighed the negative consequences, which are real, and we understand that associated with the ban in the first place."

A spokeswoman for the governor says the administration will work with the state attorney general's office on the next steps.

After the governor enacted the ban, several vape shops as well as an industry group challenged it in court, saying it was destroying their business.

Baker's ban "reflects executive overreach, which violates state constitutional separation-of-powers principles" and is "arbitrary and capricious," the plaintiffs said.

Tony Abboud, the executive director of the Vapor Technology Association, said in a statement he was pleased the judge recognized that the organization is likely to prevail in court.

"We regret, however, the court's decision to allow this improper ban to stay in place for a week while the state considers other regulatory alternatives," he said.

Massachusetts public health officials say there have been 29 confirmed or probable vaping-related lung illnesses and one death in the state.

Nationwide, the number of vaping-related lung injury cases has surpassed 1,400, and with 33 deaths, according to the U.S. Center for Disease Control and Prevention.

More From WBSM-AM/AM 1420