The Maine Senate overwhelmingly supported a bill Thursday that would raise the minimum age for buying tobacco products from 18 to 21.

The measure still requires an initial vote in the House, as well as additional votes in both chambers before it’s sent to the governor, who could veto it.

If the bill passes, though, Maine would become just the third state, after Hawaii and California, to raise its minimum age. The law only applies to purchases. People aged 18-20 would still be allowed to smoke.

The vote in the Senate was 31-4, well above the two-thirds support needed to override a veto. The House could take the bill up as early as Friday.

The bill was amended Thursday to allow anyone who is 18 as of July 2018 to buy products.

Sen. Paul Davis, R-Sangerville, the bill’s sponsor, testified during the public hearing last month that he has been affected personally by tobacco going back to his military service decades ago. He said he wanted to help stop young people from starting in the first place.

“Tobacco is the only product that, when used as intended, causes addiction, disease and death,” he said. “When I left the Army, I was heavily addicted to tobacco, smoking two packs a day. Tobacco has also tragically affected my family. I lost both my father and brother to lung cancer.”

Sen. Michael Carpenter, D-Houlton, shared a story Thursday on the Senate floor about being addicted to smoking for many years. He said he tried to quit multiple times without success. Then one Christmas, he asked his then-13-year-old daughter what she wanted. She told him she wanted him to quit smoking. He finally did.

While support was strong in the Senate, not everyone was on board.

Sen. Eric Brakey, R-Auburn, said he viewed the bill as another example of a “nanny state” regulation and criticized fellow Republicans for supporting it. Brakey, as much a libertarian as a Republican, said he didn’t understand how someone could enter military service at age 18 but not be able to decide whether they wanted to purchase tobacco products.

During the public hearing last month, opponents worried about potential lost revenue. The bill’s original fiscal note projected that the loss in revenue could be more than $8 million over the next two years. The amendment that passed Thursday adjusting the date when the change would take place reduced that to approximately $1.7 million.

Shelley Doak, representing the Maine Grocers & Food Producers Association, was among those who said the state could lose revenue, perhaps to bordering states like Massachusetts or New Hampshire, where the minimum age remains 18. She also said consumers could get around the new regulation by purchasing tobacco products online.

“Limiting youth access is a laudable goal but there are unintended consequences of increasing the age from 18 to 21 to purchase tobacco products,” Doak testified. “It creates a variance setting Maine apart and likely diverting business activity across the border or to online retailers. Face to face transactions, products behind the counter, products locked in cases, extensive employee training and point of sale software to ensure that tobacco products are only sold to age eligible adults, something that is likely not employed through Internet sales.”

The Retail Association of Maine also opposed the bill for similar reasons.

Although only two states have increased the minimum age, more than 200 individual communities have passed local laws. Last year, the city of Portland became the first city in Maine to increase the age to 21.

Sen. Geoff Gratwick, D-Bangor, a retired physician, said increasing the age is a logical incremental step.

“I think we have a right and indeed an obligation to warm people against the dangers and to make it just a little harder for people to get started,” he said.

Lance Boucher, representing the American Lung Association in Maine, said last month that the Campaign for Tobacco Free Kids estimates that there are 27,000 youth under the age of 18 in Maine who will ultimately die prematurely from smoking. He said studies by the Centers for Disease Control and Prevention show that adults, even smokers, overwhelmingly support increase the minimum age.