Young people can’t drink or purchase legal marijuana products in most states unless they’re 21, so why should young people be able to buy cigarettes or vaping products? The state of Maryland asked itself this question and worked to change the law. Now, anyone under the age of 21 (aside from members of our military service) will have to be this age to purchase tobacco products, according to the Baltimore Sun.

Advocates for the bill say that it’s aimed at protecting teens from the harmful health effects of smoking, but there’s a good chance in the future it will have a hand in stopping teens from vaping, a form of nicotine product that has gone mostly unregulated in the past few years. (FDA Commissioner Scott Gottlieb has called teen vaping an “epidemic” due to some dire statistics about its usage.

Raising the age for buying tobacco has been a priority for Democratic leaders in the state legislature, as well as the Legislative Black Caucus of Maryland.

The legislation will apply to all types of tobacco products. The restriction will include popular e-cigarette and vaping products, cigarettes, cigars, and smokeless tobacco. Retailers will be required to post signs warning that stores don’t sell these products to people under the age of 21, and includes enforcement against retailers who sell to younger customers illegally. Penalties for selling nicotine products to underage customers will still start with a fine of $300 for a first offense.

Not everyone under 21 will be affected by the bill if they want to consume nicotine products. The General Assembly accepted an amendment from Senator Michael Hough (R), to include an exception that allows people who are 18 or older to buy nicotine products if they show military identification.

“To say that people in the military, if they’re 19 or 20, can’t smoke a cigarette or a cigar, to me was an affront,” Hough said.

The American Cancer Society supported the bill and urged the governor to sign it, although they admitted that they feel the military exemption “diminishes” the bill’s ability to protect young people from the harmful effects of tobacco and nicotine use.