The Massachusetts Senate on Thursday passed a law that would ban the sales of tobacco to anyone under the age of 21.

The move is the next step toward making the state the second in the nation to enact such a ban. Hawaii was first.

The vote was 33-2, according to the State House News Service. It now neads approval from the House and a signature from Gov. Charlie Baker, who has said he supports the bill in theory but reserved judgment until he can read its language.

Boston has already set the minimum age to purchase tobacco products at 21.

The city’s Public Health Commission also outlawed the sale of flavored nicotine-delivery products, including tobacco and vaporized substances, at Boston convenience stores.

Proponents hope the statewide ban will cut back on the number of teenagers who smoke. Studies have shown that youth smoking goes down in communities where teenagers can’t buy cigarettes on their own.

RELATED: Boston to raise tobacco-buying age to 21

"What this bill is designed to do is reduce tobacco use and nicotine addiction among youth, and in so doing, we can improve our health, we can save lives, and we can also reduce health care costs," Winchester Sen. Jason Lewis, co-chairman of the Public Health Committee, told the State House News Service.

The bill has the support of the American Cancer Society’s Cancer Action Network and Tobacco Free Massachusetts.

Many municipalities in the state have taken up the cause on their own. Nearly 100 cities and towns, out of 351, have now outlawed under-21 sales.

The Retailers Association of Massachusetts has argued against it, saying it won’t cut down on tobacco use but would increase tobacco sales on the black market and send tax revenue across state lines.

RELATED: Convenience store owners protest Boston’s ban on flavored tobacco

Other efforts in the state to curb smoking have been met with opposition. An effort in the town of Westminster to ban all sales of tobacco to anyone regardless of age in 2014 was met with huge protest and drew national attention.

The ban would take effect in January 2017 and would exempt smokers who are already 18.

It would also prohibit pharmacies from selling cigarettes. CVS made the headline-grabbing decision to remove tobacco from its shelves in 2014.

And it would ban tobacco vending machines, ban the use of electronic cigarettes where tobacco use is already off-limits and require that e-cigarette materials be sold in child-resistant packaging.

RELATED: Walsh strikes out chewing tobacco at Fenway, other ballparks