Legislators took two important steps last week toward improving public health in Massachusetts by approving raising the legal age to buy tobacco products from 18 to 21, and closing the loophole exempting from state regulation bodyworks businesses that authorities say often are fronts for human trafficking.

Massachusetts is poised to become the sixth state requiring that people be at least 21 to purchase cigarettes or other tobacco or vaping products after the House and Senate overwhelmingly approved the measure Thursday and sent it to Gov. Charlie Baker. He previously has signaled support for the higher age.

This is common-sense legislation that would help curb teen smoking, which should lead to fewer smokers at any age. “Research shows that if a person does not begin smoking at a young age, they are much less likely to ever smoke,” says Marc Hymovitz, the Massachusetts director of government relations for the American Cancer Society Cancer Action Network.

California, Hawaii, Maine, New Jersey and Oregon, along with several major cities including New York and Chicago, already have raised the legal tobacco-buying age to 21. Needham was the first community in the nation to ban under-21 sales in 2005, and a total of 172 cities and towns in Massachusetts now have followed suit. Eighteen, including Amherst, Easthampton, Greenfield and Northampton, are in Hampshire and Franklin counties.

Retailers have said they favor a uniform state regulation rather than having ages that vary from community to community.

If signed by Baker, the new law would take effect Jan. 1 and eventually bring the age for legal tobacco sales in line with those for alcohol and marijuana. It would be phased in over three years so that anyone already old enough to buy tobacco under the current law could continue to do so.

The legislation applies to vaping products and would ban the use of electronic cigarettes on school grounds and other public places. Massachusetts also would become the first state to ban tobacco sales in all pharmacies.

We are glad that vaping products are covered, because they are becoming increasingly popular with young people. Those devices, which turn liquid usually containing nicotine and flavorants into an inhalable vapor, have become a $4 billion industry in the United States, despite little research about their long-term health risks.

Banning tobacco sales in pharmacies should have been done long ago, following the lead of the CVS chain, which in 2014 stopped selling tobacco in its stores. Tobacco should not be sold under the same roof as medications and other health-care products.

We hope that Baker signs the package into law and puts Massachusetts in the forefront of the nationwide effort to discourage smoking and vaping by teenagers.

In separate action Thursday, the Senate unanimously approved legislation that would extend state licensing requirements to bodyworkers — defined in the bill as people who use touch, words or directed movement to deepen awareness of patterns of movement in the body. The measure is modeled after the current licensing procedure for massage therapists and would set standards for advertising and authorize the Division of Professional Licensure to inspect and investigate complaints.

The legislation requires House approval before going to Baker. If it is signed into law, it would apply to businesses such as the Pine Spa in Northampton and Hadley Massage Therapy, which the state attorney general’s office previously linked to human trafficking for sex. Both of those establishments have closed since four people were accused last year of running sex-trafficking rings in the region.

The legislation sponsored by Sen. Mark Montigny, D-New Bedford, was praised by Attorney General Maura Healey: “In case after case that we prosecute, human traffickers exploit the bodyworks loophole to oppress victims, escape oversight, and avoid law enforcement.”

Hadley Police Lt. Mitchell Kuc agrees that the proposed law would be helpful. “Legislation that provides further oversight of these types of businesses will be warmly welcomed.”

The measure would restructure the Board of Registration of Massage Therapy to include two bodyworks practitioners and a representative of law enforcement who specializes in human trafficking.

No business should be exempt from licensing and inspection procedures that help prevent it from serving as a front for human sex trafficking. We urge the House to follow the Senate’s lead and approve this important bill before the formal legislative session ends July 31.