The New York City Council voted overwhelmingly Tuesday to ban flavored e-cigarettes as officials seek to curb a spike in underage vaping.

The ordinance bans all flavored e-cigarette and vaping liquid flavors except for tobacco. Mayor Bill de Blasio will either sign the bill or let it pass into law, his deputy press secretary Avery Cohen said, which will make New York the largest city in the U.S. to ban all vaping flavors except tobacco.

The New York City Council Health Committee voted unanimously in favor of the legislation on Monday, and of the city council's 51 members, 31 signed on as co-sponsors of the bill. The bill passed in a vote of 42 to 2.

"New York City is finally addressing a public health crisis which has been mounting for years while state and local governments across the nation did next to nothing. We are finally taking action to address the resurgence of youth nicotine addiction caused by e-cigarette usage," City Council Health Committee Chair Mark Levine, who introduced the legislation, said in a statement Tuesday. "With this vote, the City Council is moving to ban the fruity, minty, candy-like flavors of e-cigarettes which were clearly designed to appeal to young people in the first place."

The move comes as U.S. health officials struggle to combat a mysterious vaping lung disease that has sickened more than 2,100 and killed 42 people, two of whom lived in New York City. The Trump administration announced plans in September to ban all flavored e-cigarettes, but federal officials have since wavered on the ban.

In the absence of federal action, state and municipal officials around the country are responding to what some federal officials have described as an epidemic of teen vaping.

The Massachusetts legislature passed a ban on all flavored tobacco last week, and San Francisco voters passed a referendum that banned flavored vaping products in June 2018. State governors, including New York Gov. Andrew Cuomo, have sought to temporarily ban flavored vaping products, but those efforts have been stalled in court. And the attorneys general of New York, California and D.C. all filed separate lawsuits against e-cigarette manufacturer Juul this week, alleging that the company targeted young people.

Campaign for Tobacco-Free Kids President Matthew Myers celebrated Tuesday's passage of the bill as a rallying call for national action but also hopes regulators go further.

"New York's action provides a major boost for the growing national movement to end the sale of flavored e-cigarettes and other flavored tobacco products," Matthew Myers, president of Campaign for Tobacco-Free Kids, said in a statement Tuesday. "Flavored products have long been a favorite tobacco industry strategy for targeting kids. In addition to e-cigarettes, more than half of youth smokers – including seven out of ten African-American youth smokers – smoke menthol cigarettes."

More than 26% of high school students currently use e-cigarettes, according to the Centers for Disease Control and Prevention. In New York, city officials have found an alarming trend among children as young as 11, pediatrician and city Health Commissioner Dr. Oxiris Barbot wrote in a Sept. 13 column for CNBC. About 13,000, or 1 in 15, middle-school students in New York City reported that they currently use electronic cigarettes. The numbers rose considerably by grade with 2.6% of sixth graders saying they use e-cigarettes versus 8.4% of eighth graders.

"One of the many alarming things about these numbers is that e-cigarettes only became popular less than a decade ago. I have seen firsthand the dangers of nicotine use for young people," she wrote.

New York City already had a law banning flavored tobacco products, but menthol cigarettes and e-cigarettes were not included. The new legislation will apply the flavor ban to e-cigarettes, but not menthol cigarettes.

The tobacco and vaping lobby pushed back on the legislation, saying that an outright ban will harm adults who use e-cigarettes to stop smoking cigarettes.

"Bans and prohibitions are not an effective strategy to address youth vaping issues," spokesperson at Reynolds American Kaelan Hollon said. "We believe some flavors are important in helping adult smokers migrate away from cigarettes and removing all flavors will inhibit smokers who have and continue to look for potentially less harmful alternatives to cigarettes."

City Council Speaker Corey Johnson, who has spoken about his use of e-cigarettes to quit smoking cigarettes, "proudly supports" the bill, according to council spokesperson Jennifer Fermino. She said the speaker would like to further tackle the matter of menthol cigarettes.

"He will continue to work to address the public health crisis associated with menthol cigarettes, which have been shamefully marketed to communities of color for decades," she said. "The Speaker is committed to meeting with the new Police Commissioner, the District Attorneys and other stakeholders to try and address those concerns and bring an end to this public health crisis."