Gov. Charlie Baker’s ban on the sale of all vaping products cleared its first legal hurdle on Friday, when a federal judge said she is unlikely to issue a temporary restraining order.

That means the ban will remain in place until at least Oct. 15, when U.S. District Court Judge Indira Talwani plans to hold a hearing on a preliminary injunction.

During a hearing at the U.S. District Court in Boston, Talwani expressed skepticism that the economic harm to the vaping industry outweighs the public health interest that inspired the ban. “You’re saying I ought to be more concerned about the economic harm to businesses for a two-week period than the potential people who will end up in the hospital during this two-week period?” Talwani asked attorney Joseph Terry, a Washington, D.C.-based attorney from Williams and Connolly who represents the Vapor Technology Association.

Amid a nationwide outbreak of severe vaping-related lung illnesses, Massachusetts recently became the first state to ban the sale of all vaping-related products.

Gov. Charlie Baker and Public Health Commissioner Monica Bharel have said the ban is necessary to protect the public from a health crisis that has sickened 1,080 people nationwide and killed 18, according to the U.S. Centers for Disease Control. They instituted the ban for four months to allow state and federal officials to determine the cause of the illnesses and decide what, if any, future regulatory steps are necessary.

Multiple vape shops and the Vapor Technology Association, in two separate lawsuits, challenged the ban. They are arguing that the ban is unconstitutional, that it impedes interstate commerce and is preempted by federal law, since the U.S. Food and Drug Administration already regulates vaping products.

The vape shops say they have had to close stores and lay off employees, and that they are losing thousands of dollars a week and will likely be forced to permanently shut down if the ban continues as intended until Jan. 25, 2020.

The vaping stores had asked Talwani to immediately lift the ban until a full hearing can be held, with witnesses and additional evidence, on a preliminary injunction. A preliminary injunction could then lift the ban until a trial can be held to determine whether the ban is legal.

To lift the ban, Talwani would need to determine that it is causing irreparable harm to the businesses and that the businesses have a likelihood of winning the case.

At a hearing Friday, Terry argued that the ban “was ill-considered and over-broad.” He argued that most illnesses have been tied to black-market products and vaping products with THC, not nicotine. There is no evidence that legal, nicotine-based vaping products, which are regulated by the U.S. Food and Drug Administration, are the cause, he said.

“This is like you had people who went blind from drinking moonshine and you ban all alcohol,” Terry said.

But Assistant Attorney General Julia Kobick, who is representing Baker and Bharel, said public health officials have made clear that they do not yet know what types of vaping products are causing the respiratory illnesses, which have severe symptoms consistent with chemical burns on the lungs. “We don’t know what is causing these Americans to have to be hospitalized,” Kobick said.

Of 10 cases of confirmed or probable illnesses in Massachusetts, five people said they used only THC, four vaped nicotine and THC, and one used only nicotine, according to public health officials. So far, 118 possible cases have been reported to the state Department of Public Health, and most remain under investigation.

While attorneys for the vape shops tried to argue that e-cigarette use is safer than the use of regular cigarettes, Talwani shot back that the FDA has not said that “it’s safer than not using anything for all the children who weren’t using cigarettes.”

Terry and Saugus attorney Craig Rourke, who represents a group of vape shops, said the businesses they represent will go under if they cannot sell vape products for four months. Terry also argued that it “weakens the supply chain” nationwide, if wholesalers lose their Massachusetts customers.

While Massachusetts-based businesses can sell to customers out of state, the attorneys said most vape shops are small businesses that only have in-state customers.

“The vaping industry in Massachusetts is built on the backs of small businesses,” Terry said.

In an interview after the hearing, Khurram Agha, regional manager of Vapor Zone’s stores in Saugus, Danvers, Ipswich and Norton, said the company, which is one of the plaintiffs, will have to shut down permanently in two or three weeks if the ban is not lifted. Agha said the stores are currently closed, 11 employees were laid off, some products are set to expire in a week or two, and the store has to pay rent on its leases.

But during oral arguments, Kobick argued that there is at most a “modest burden” on interstate commerce, which is the basis of the vape shops’ complaint, “balanced against a very vital public health interest at stake in preventing more deaths and injuries from these illnesses.”

Kobick said the Legislature gave the governor and public health commissioner authority to declare a public health emergency for “precisely these circumstances where you have a still unfolding, escalating public health crisis where we don’t know the cause yet.”

Talwani said she plans to issue a written decision denying the request for a temporary restraining order on Friday afternoon.