(CNN) – A new federal law sets the minimum age to buy tobacco products at 21.
President Donald Trump signed the measure into law Friday as part of the $1.4 trillion spending agreement to fund the federal government.
A bipartisan group of senators had wanted the measure for some time. They finally got it pushed through by attaching it to spending bills that had to pass to avoid a government shutdown.
The measure prohibits the sale of vaping products and traditional tobacco products like cigarettes to anyone under the age of 21.
Many states have already raised their legal ages for purchasing tobacco, but the new measure mandates the minimum age of 21 nationwide.
The change will take effect in about nine months, ABC News reports.