(CNN) President Donald Trump on Friday signed a sweeping spending bill into law, including a measure that prohibits the sale of tobacco products to anyone under the age of 21.

The increased age restriction for tobacco purchases is one of several provisions outside of the spending measures themselves that will be attached to the broader $1.4 trillion spending agreement.

I will be signing our 738 Billion Dollar Defense Spending Bill today. It will include 12 weeks Paid Parental Leave, gives our troops a raise, importantly creates the SPACE FORCE, SOUTHERN BORDER WALL FUNDING, repeals "Cadillac Tax" on Health Plans, raises smoking age to 21! BIG!

The restriction on tobacco sales has long been pushed by a bipartisan mix of senators: Senate Majority Leader Mitch McConnell, a Kentucky Republican; Republican Sens. Mitt Romney of Utah and Todd Young of Indiana; as well as Democrats including Sens. Richard Durbin of Illinois, Tim Kaine of Virginia and Brian Schatz of Hawaii.

Those lawmakers have been looking for a way to get the prohibition across the finish line and now they've found one, by attaching it to a must-pass series of bills to avoid a government shutdown.

States that have already raised the minimum age

Raising the legal age to purchase tobacco products in the United States from 18 to 21 marks a major public health achievement for the White House. There already have been several states that have individually passed legislation to raise the tobacco-buying age to 21.

As of December, 19 states have raised the minimum age to buy tobacco products to 21, according to the nonprofit Campaign for Tobacco-Free Kids : Arkansas, California, Connecticut, Delaware, Hawaii, Illinois, Maine, Maryland, Massachusetts, New Jersey, New York, Ohio, Oregon, Pennsylvania, Texas, Utah, Vermont, Virginia and Washington.

Washington, DC, and more than 500 cities and towns also have raised the age.

Trump has previously spoken in favor of raising the age limit to buy tobacco products, including e-cigarettes and vape products, to 21.

"We have to take care of our kids, most importantly, so we're going to have an age limit of 21 or so, so we'll be coming out with something next week very important on vaping," Trump said while standing outside of the White House in November.

In September, Trump said that the US Food and Drug Administration would put out "some very strong recommendations" regarding the sale of flavored e-cigarettes. At the time, Trump administration officials said the agency would remove all non-tobacco-flavored vaping products from the market.

The announcement came amid continued concerns about rising levels of youth vaping and a mysterious outbreak of vaping-related lung injuries.

Health organizations have pressured the administration to ban flavors, which are popular among young people. Vaping advocates have argued they're a tool for adult smokers to quit combustible cigarettes. Vape shop owners have argued that limits on sales of flavors would destroy their businesses.

The new provision in the spending bill could be seen by some as the president's response to the youth vaping epidemic. Vaping remained popular among teens across the United States in 2019.

The latest report from a federal survey , called Monitoring the Future , found that 1 in 4 12th graders, 1 in 5 10th graders and nearly 1 in 10 8th graders say that they have vaped nicotine in the past month.

Advocates want more from the White House to curb youth vaping

"We applaud congressional efforts to prohibit the sale of tobacco products to anyone under 21 and urge the President to sign this bill. The Vapor Technology Association has advocated for raising the age to 21 for all tobacco products, including e-cigarettes, and believes, along with the public health groups, that this is the most significant step that can be taken to reduce youth access and use," Tony Abboud , executive director of the Vapor Technology Association, said in an emailed statement on Friday.

"VTA stands ready to continue working with Congress on the many real solutions (rather than a misguided flavor ban agenda), that should be implemented to achieve the twin goals of restricting youth vaping and preserving flavored vapor as an alternative for adults desperately trying to quit smoking," Abboud's statement said.

Yet many health and parent organizations have called on the President to do more than raise the legal tobacco-buying age.

On Monday, Matthew Myers, president of the Campaign for Tobacco-Free Kids, said in a written statement that raising the federal tobacco age to 21 without also prohibiting flavored e-cigarettes will not stop the youth e-cigarette epidemic.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

"Raising the tobacco age to 21 is a positive step, but it is not a substitute for prohibiting the flavored e-cigarettes that are luring and addicting our kids," Myers said in part.

"To reverse the e-cigarette epidemic, policy makers must prohibit flavored e-cigarettes and cannot be limited by what the tobacco industry says is acceptable," Myers' statement said. "The evidence is clear that flavored e-cigarettes are driving the youth epidemic. Most youth e-cigarette users use flavored products and cite flavors as a key reason for their use. As long as flavored e-cigarettes remain available, kids will find ways to get them and this epidemic will continue."