BOSTON (AP) — A Massachusetts judge has granted a motion from the state attorney general’s office to bar five online e-cigarette retailers from selling their products to state residents while a lawsuit against the companies is pending.

Suffolk Superior Court Judge Linda Giles granted the motion for a preliminary injunction on Tuesday.

Attorney General Maura Healey last month sued eight online retailers of e-cigarettes she alleges violated the state’s new ban on the sale of flavored tobacco products. All are based out of the state.

Healey alleges the companies violated state laws and regulations by selling flavored tobacco products to Massachusetts consumers and failing to protect against delivery of these products to minors.

Healey’s office is still in the process of serving the other three companies.

Massachusetts in November became the first state in the country to ban the sale of all flavored tobacco products, including menthol cigarettes, e-cigarettes and e-liquids.