If signed into law, Massachusetts would be the first state to ban all flavored e-cigarettes and tobacco products through legislation.

Credit...Drew Angerer/Getty Images

CAMBRIDGE, Mass. — Massachusetts has moved a step closer to banning all flavored e-cigarettes and tobacco products, including menthol cigarettes, amid a national push to contend with the risks of vaping.

The State Senate followed the House late Wednesday in passing a sweeping ban, which, if signed into law, would make Massachusetts the first state in the nation to bar all flavored vaping and tobacco products. Other states were said to be closely watching the outcome in Massachusetts.

More than 40 people have died and more than 2,000 others have been sickened in recent months from respiratory illnesses that the authorities have connected to vaping. Most of the illnesses have been attributed to vaping THC products, but the outbreak has set off a flurry of efforts to regulate e-cigarettes.

President Trump announced in September that his administration would ban the sale of most flavored e-cigarettes, citing the illnesses and a rise in vaping among young people. But he set aside that plan, under pressure from lobbyists and political advisers, who told him the move would cost him support.

In recent months, governors of several states have used executive powers to impose bans — most of them temporary — on flavored vaping products. But Massachusetts would be the first state to ban all flavored e-cigarettes and flavored tobacco products through legislation.

In Massachusetts, different versions of the measure from the Democratic-led House and Senate were expected to be reconciled before the bill is sent to the desk of Gov. Charlie Baker, a Republican. Governor Baker has not said whether he would sign it. In September, in response to the rise in vaping-related illnesses, the governor instituted an emergency ban on the sale of all vaping products; that ban is set to expire next month.

In addition to banning flavored e-cigarettes and tobacco products, the bill would impose an excise tax on e-cigarettes, require insurers to cover tobacco cessation counseling and nicotine replacement therapies like gum and patches, and would restrict higher-level nicotine products to 21-and-over stores.

Experts said that the ban on menthol cigarettes was particularly notable. In 2009, Congress banned all flavored cigarettes, but, in a political compromise, it exempted menthol. African-American smokers overwhelmingly smoke menthol cigarettes, in part because of marketing efforts by tobacco companies, and the Congressional Black Caucus was split at the time over whether to ban them. The N.A.A.C.P. now supports state and local efforts to restrict the sale of menthol cigarettes.

The Massachusetts Black and Latino Legislative Caucus supported the bill.

“This is a public health issue, but it’s really about justice,” said Jon Santiago, a Democratic lawmaker who represents parts of Roxbury and the South End, and who is also an emergency physician at Boston Medical Center, the city’s safety-net hospital.

“We believe this bill ultimately will protect generations of black and brown youth for years to come.”

Dr. Jonathan Winickoff, a general pediatrician at Massachusetts General Hospital for Children, said that the menthol exception in the 2009 bill had been “very damaging to kids.”

“The concern with menthol,” he said, “is that it’s really the emperor of all flavors, because it’s both a flavor and an anesthetic,” numbing the throat and making it easier to inhale tobacco smoke deep into the lungs.

“It’s the pathway onto smoking for the majority of kids, so this is a key flavor,” he said. “If you make it to age 21 without smoking, there’s only a 2 percent chance that you’ll ever end up as a smoker.”

A report released by the Food and Drug Administration in 2013 said that menthol cigarettes made it easier to start smoking and harder to quit.

The New England Convenience Store and Energy Marketers Association has opposed the bill, saying that banning menthol cigarettes would damage the state economically and in other ways.

“Menthol and mint tobacco is a billion-dollar market in Massachusetts,” said Jonathan Shaer, the association’s executive director. “A billion dollars in market demand does not disappear because Massachusetts chooses to ban it. Instead that demand will absolutely find markets, but now instead of being in the licensed, regulated, taxed market, it will now be in the illicit market, the online market, and it will go over our borders, especially to New Hampshire, which stands to gain a windfall in tax revenue.”

Representative Danielle Gregoire, a Democrat and the primary sponsor of the ban in the House, said that the bill was aimed at addressing what she called “the epidemic of youth vaping in Massachusetts.”

She said she had included menthol cigarettes in the ban for two reasons. First, she said, there was concern that if the Legislature just banned flavored e-cigarettes, some young people would simply turn to menthol cigarettes.

Second, Ms. Gregoire said, the e-cigarette industry has argued that it should have parity with combustible cigarettes, so if the Legislature had allowed traditional menthol cigarettes to remain on the market, the e-cigarette industry would most likely have argued that mint and menthol e-cigarettes should also be allowed.

If Governor Baker signs the bill and it becomes law, Ms. Gregoire said she expected other states to follow Massachusetts’ lead when their legislatures resume next year.

“If we can get this bill signed by the governor with the mint menthol ban intact, it will provide cover; it will provide evidence that that kind of ban works and is necessary,” she said.

Mark A. Gottlieb, the executive director of the Public Health Advocacy Institute at Northeastern University School of Law, said he saw the Massachusetts bill’s inclusion of menthol cigarettes as a step toward the phasing out of conventional cigarettes entirely.

“I have to believe that in the next decade or two, at most, we’re going to see those combusted tobacco products like Marlboro and Camel and the like eventually be regulated out of the marketplace,” he said.