Congress on Thursday voted to raise the national minimum age to purchase tobacco products from 18 to 21, ushering in the sweeping new policy as part of a must-pass government funding package.

The Senate approved the policy within an eight-bill package in the run-up to the holiday recess. The package, which previously won House approval, is part of a series of measures meant to avert a looming government shutdown.

But amid a bitter impeachment fight and other Capitol Hill drama, the bills contained major policy changes, including the minimum age increase for cigarettes and e-cigarettes.

The raise in the tobacco age had support from unlikely sources: Altria, the nation's largest tobacco company, and Juul Labs, known for its e-cigarette vaping devices. Tobacco critics contend the companies’ support is calculated to head off even harder-hitting government action: a ban on all flavored tobacco products, including fruit and dessert e-cigarettes.

SPENDING PACKAGE HIGHLIGHTS DIVISION BETWEEN 'SQUAD,' HOUSE PROGRESSIVES AND DEM LEADERSHIP

“Altria and Juul clearly support this in order to argue that no other action is necessary,” said Matthew Myers of the Campaign for Tobacco-Free Kids.

The measure, known commonly as Tobacco 21, was included as part of a $1.4 trillion spending package that covered other notable policy changes, such as an expensive repeal of Obama-era taxes on high-cost health plans, help for retired coal miners, and $1.4 billion for President Trump's border wall, down from the $8 billion he requested but the same that was appropriated for it last year.

Democrats secured $425 million for states to upgrade their election systems, as well as increases for the U.S. Census budget, the Environmental Protection Agency, renewable energy programs and affordable housing.

The package passed with a 71-23 vote. Sen. Mike Lee, R-Utah, opposed the spending measures, calling the bills "a fiscal dumpster fire."

President Trump is expected to sign the legislation when it reaches his desk.

"The president is poised to sign it and to keep the government open," said top White House adviser Kellyanne Conway.

CLICK HERE TO GET THE FOX NEWS APP

An additional four-bill "minibus" is up for a procedural vote later in the day. The passage of the spending bills comes a day before the Dec. 20 deadline, after which the government would have shut down. The bills provide government funding through the remainder of the fiscal year, which goes until Sept. 30, 2020.

Fox News' Chad Pergram and The Associated Press contributed to this report.