TRENTON, N.J. — New Jersey lawmakers on Monday passed legislation to prohibit flavored vaping products, sending the measure to Democratic Gov. Phil Murphy's desk.

The Democrat-led Senate passed the bill 22-15, with the Democratic-controlled Assembly voting 53-11 with eight lawmakers not voting on the on the measure that bans e-cigarettes flavors, including any fruit or candy among others.

Lawmakers say the flavors are meant to hook young people, who are using the products in increasing numbers. Opponents of the legislation, who crowded part of the statehouse complex Monday, say officials should better enforce the smoking age instead of barring of-age adults from buying products they enjoy using.

The smoking age in New Jersey is 21.

“Our state cannot and will not ignore the widespread use of these harmful nicotine products among adolescents,” Democratic Assemblyman Herb Conaway said.

Murphy has been supportive of the idea of a flavor ban, but his office didn't respond when asked how he'll handle the legislation.

Massachusetts is the only other state with a statewide ban on flavors, according to the Campaign for Tobacco-Free Kids, though eight states have enacted emergency regulations to halt the sale of flavored vaping products. The rules face legal challenges and are in effect in only three states, according to the campaign: Massachusetts, Rhode Island and Washington.

Republican President Donald Trump's administration said this month that it would move to prohibit fruit, candy, mint and dessert flavors from small, cartridge-based e-cigarettes. The federal ban, though, lets menthol and tobacco-flavored e-cigarettes remain on the market.

The New Jersey measure would bar menthol, but would permit tobacco flavors.

The legislation gained steam during an outbreak that appears to have started in March. Many of the cases occurred in August and September.

CDC officials have said they had narrowed in on a culprit: a chemical compound called vitamin E acetate that has been found in the lungs of some sick patients and in the products they vaped. Vitamin E acetate is a thickening agent that has been added to illicit, high-inducing vaping liquids.