BOSTON -- A bill that would raise the statewide age for buying tobacco from 18 to 21 was sent to Gov. Charlie Baker's desk on Thursday, after final procedural votes by the House and Senate.

Marc Hymovitz, Massachusetts director of government relations for the American Cancer Society Cancer Action Network, said lawmakers "have taken a huge step towards combating the tobacco industry's influence on Massachusetts' youth and protecting future generations of our children from becoming addicted to this deadly product."

Baker has said in the past that he is "conceptually" in favor of the idea.

Currently, someone can buy tobacco at 18 in Massachusetts, but cities and towns can impose a higher age. More than 170 municipalities have raised the age above 18, leading to a patchwork of regulations.

Public health advocates say most people who are addicted to smoking start as teenagers or young adults. According to the American Cancer Society, 95 percent of adults who smoke started smoking before age 21.

The idea of raising the age would be to make cigarettes less easily accessible to teenagers and high school students.

"Increasing the tobacco age to 21 will help counter the industry's relentless efforts to target young people at a critical time when many move from experimenting with tobacco to regular smoking," said Matthew Myers, president of the Campaign for Tobacco-Free Kids, in a statement.

If Baker signs the bill, H.4486, Massachusetts would become the sixth state to raise the tobacco buying age to 21, after California, Hawaii, Maine, New Jersey and Oregon.

The bill would also prohibit selling tobacco products in pharmacies and health care facilities.

A statement from the American Lung Association said, "The removal of tobacco from pharmacy shelves helps reduce the consumption, availability, and visibility of these products in our local communities - and supports current smokers who want to quit."

The bill would also regulate electronic cigarettes -- raising the age for buying e-cigarettes to 21, prohibiting the smoking of e-cigarettes on school grounds and in nursing homes, prohibiting the sale of vaping products in vending machines, and requiring nicotine and tobacco products to be packaged in childproof containers. A task force would be formed to explore further regulations on vaping.

The bill would go into effect Dec. 31. Anyone who turned 18 before that date would still be allowed to purchase cigarettes, even if they were not yet 21.

Someone who sells cigarettes to a minor would be hit with a $100 fine for a first offense, up to a $300 fine for a third offense. There would be fines of up to $1,000 for anyone who knowingly sells nicotine products without child-resistant packaging.

A group of youth peer advocates from Springfield, trained by staff from the Martin Luther King Jr. Family Services, visited the Statehouse multiple times to lobby for the bill.

Samantha Hamilton, MLK Family Services director of operations, said a Springfield coalition did community outreach, had tables at community events and tried to raise awareness about the bill. "In our community, there's a saturation of bodegas, corner stores and small shops that sell tobacco retail products," Hamilton said. "We see it in our streets."

Community health worker Aumani Harris said many young people in the Springfield area are seeing their friends vaping and their family members affected by tobacco-related illnesses.

Tailanae Brantley, 17, of Springfield, is one of those youth peer advocates who traveled to Boston to lobby lawmakers. Brantley said she has seen her friends smoking, even those who are under 18. By raising the age to 21, Brantley said, "I feel like that's an old enough age to where we're not really communicating with them, they're more of adults."

Brantley said smoking is like "putting your life in jeopardy or putting your education at risk" because of the health concerns. "There are so many people my age and younger that are suffering from this. ... It's ruining our chances of having a future," she said.