The Massachusetts Senate on Thursday agreed to raise the tobacco-buying age to 21, ban e-cigarettes in places where smoking is already prohibited, and ban the sale of tobacco products at pharmacies.

A similar bill cleared the House in May and if Gov. Charlie Baker signs the bill into law Massachusetts will become the sixth state in the country to refuse to sell tobacco products to anyone under the age of 21, according to the American Lung Association. Baker has said he is "conceptually" supportive of the age increase.

The bill cleared the Senate 33-3, with Republican Sens. Ryan Fattman, Donald Humason and Dean Tran voting in opposition.

"Tobacco use and nicotine addiction remains the leading cause of preventable illness and premature death in Massachusetts, and tobacco use and nicotine addiction is responsible for more than $4 billion annually in health care costs in Massachusetts," Sen. Jason Lewis said.

He also said raising the minimum age to 21 is "a proven strategy to get tobacco and nicotine products out of high school social networks and away from youth."

Lewis said 170 of the state's 351 cities and towns have already raised the tobacco-buying age to 21 and that 71 percent of the state's population lives in a community where the age is 21.

The American Lung Association cheered the Senate's vote on Thursday.

"This statewide law grew from local governments raising the age of sale in their communities — and it will now play an important role in increasing their efficacy," Jeff Seyler, chief division officer of the ALA, said in a statement. "We are proud to see Massachusetts return to a leading national role on public health policy."