The Senate on Thursday, Dec. 19, passed a $1.4 trillion spending package, avoiding a shutdown and funding the government through the rest of the fiscal year, including the border wall.

Lawmakers cleared the two-bill package in a series of votes, sending it to President Donald Trump in time to prevent a possible government shutdown this weekend. The White House said Trump would sign it before midnight on Friday.

The first bill, covering domestic programs, passed by a vote of 71-23. A Pentagon and homeland security measure passed hours later in a vote of 81-11, which was the last tally for the year in the Senate.

The bill delivers a win for President Trump on his U.S.-Mexico border fence and offers Democrats long-awaited increases in domestic spending and the elimination of high-cost health insurance coverage taxes from the Obama era. This combines spending increases for both parties — politicians ‘ reelection fodder— with tax and benefit add-ons that will raise the deficit over 10 years by around $400 billion.

“These spending bills are a fiscal dumpster fire,” said Sen. Mike Lee (R-Utah). “This is embarrassing.”

Key provisions include the expensive elimination of Obama-era taxes on high-cost health plans, aid to disabled coal miners, and an 18-21 rise in the national legal age to purchase tobacco products. Senate Majority Leader Mitch McConnell (R-Ky.) sponsored the tobacco bill.

McConnell emerged as a victor, securing the politically popular $6 billion pension bailout for nearly 100,000 former coal miners, along with more parochial things such as assistance to the legal hemp industry in his state, and $410 million to build a new military hospital in Louisville.

The Chairman of the Senate Appropriations Committee Sen. Richard Shelby (R-Ala.) won several things for his state, including a $378 million harbor dredging plan. To expand Mobile Harbor to accommodate larger cargo ships, it is expected to deliver the lions share to a Shelby-backed initiative.

House Speaker Nancy Pelosi (D-Calif.), was also a driving force, securing a permanent elimination of a high-cost health insurance “Cadillac” tax that is unpopular with Democratic labor allies.

Leading lawmakers cut a deal on Monday after months of bargaining that gives President Trump a steady stream of money for the border wall.

“I would have preferred no funding for the wall,” said Sen. Patrick Leahy (D-Vt.) the vice chairman on the Senate Appropriations Committee. “But the Republicans were clear. … They stood with the president on the wall, as they seem to do time after time.”

The bill also offered business-friendly provisions on export financing, flood insurance, and immigrant workers. A tax on medical devices and health insurance plans would be repealed permanently.

Democrats controlling the House succeeded in winning a 3.1 percent increase for federal civilian employees and the first installment of funding for gun violence research after more than two decades of gun lobby opposition.

Democrats won $425 million for states to upgrade their electoral systems and, in turn, boosted the US. $1.4 billion in the census budget beyond Trump’s order.

Includes reporting from the Associated Press