Texans will soon have to wait until their 21st birthday to buy tobacco and nicotine products products — with the exception of young military members.

Sen. Joan Huffman, a Republican from Houston, said she crafted Senate Bill 21, which takes effect Sept. 1, hoping that it would keep cigarettes, electronic cigarettes and tobacco products out of public schools by creating more “social distance” between younger students and students old enough to purchase them. In Texas, nearly 12% of high school students smoke cigarettes, and 19% use e-cigarettes, according to data from the Campaign for Tobacco-Free Kids.

"If we can have [kids] leave high school tobacco and nicotine free, that's a huge win," said Jennifer Cofer, director of the End Tobacco Program at the University of Texas MD Anderson Cancer Center.

The original bill didn't exempt military members, but that changed after some Republican resistance in both the House and Senate. More than 12,500 active-duty troops ages 18 to 20 live in Texas, according to The Dallas Morning News.

When Gov. Greg Abbott signed the bill, Texas became the 16th state to raise the legal age to purchase tobacco. John Schachter, director of state communications at the Campaign for Tobacco-Free Kids, has been following similar laws as they play out in legislatures across the country.

E-cigarette companies Juul and Altria both supported the Texas bill, which also prevents local governments from raising the legal age higher than 21.

Schachter said his group's only issues with the Texas bill are that it lacks funding for enforcement to ensure retailers follow the new law, and it still includes fines that punish underage smokers who get caught with tobacco products. Campaign for Tobacco-Free Kids supports the elimination of youth penalties all together — and while that didn't happen in Texas, the state reduced fines for underage smokers from $250 to $100.

"The youth themselves are already victims of the tobacco industry and its billions of dollars of marketing that lure them and addict them before they're adults,” Schachter said. “They should not be further penalized when it's the retailers who are the ones who are in violation of the law in selling to these underage kids."

Enforcement of tobacco laws — like sending law enforcement to retail locations that sell tobacco products and running sting operations with “minor decoys” — is costly. Texas lawmakers allocated about $9.5 million in this year's budget to reducing the use of tobacco products across the state — about $3 million more than the last budget — but that money is largely dedicated to prevention and education rather than enforcement.

Cofer, the director of MD Anderson's program, said the bill is still a step in the right direction.

"We're going to see a major shift in public health, and ultimately cancer reduction," Cofer said.

Disclosure: The University of Texas has been a financial supporter of The Texas Tribune, a nonprofit, nonpartisan news organization that is funded in part by donations from members, foundations and corporate sponsors. Financial supporters play no role in the Tribune's journalism. Find a complete list of them here.

The Texas Tribune provided this story.