However, Trump tweeted Friday morning that he may veto the measure over funding for a southern border well and a lack of provisions for young immigrants who were brought to the U.S. illegally when they were children.
Congress approved the more than 2,200-page legislation swiftly with a midnight Friday government shutdown deadline looming. The plan was released only Wednesday night.
The Senate passed the proposal by a bipartisan 65-32 vote. The House approved the bill Thursday afternoon by a 256-167 vote with bipartisan backing.
The legislation would fund the government through the end of September. It would significantly boost military spending and increase funding for border security, infrastructure and efforts to fight the opioid epidemic, among other programs. It also includes measures meant to strengthen gun sale background checks and improve school safety.
Some members criticized the rushed process to pass the proposal. They expressed concerns about the limited time to read and understand the massive legislation.
Throughout Thursday night, Sen. Rand Paul, R-Ky., voiced objections to the spending increases and left it unclear whether he would hold up a vote on the bill. He delayed a vote on the budget deal that set up the spending increases last month, carrying the Senate past a government shutdown deadline.
Senate Majority Leader Mitch McConnell, R-Ky., personally talked to Paul and Sen. James Risch, R-Idaho, to ensure they did not hold up the vote and increase the shutdown risk. Risch threatened to trip up the bill by demanding lawmakers remove a provision naming a federal wilderness area after a deceased political rival.
The bill now heads to Trump, who had been expected to sign it into law despite misgivings about it earlier this week. Trump had concerns over such issues as the amount of money set aside for his proposed border wall, the lack of a sanctuary cities provision, and whether funding would go toward a rail tunnel connecting New Jersey and New York that he opposed.
He reportedly threatened to veto it days ago, but tweeted his support for it Wednesday night after a discussion with House Speaker Paul Ryan and McConnell.
Office of Management and Budget Director Mick Mulvaney reiterated Trump's support on Thursday and said he "looks forward to signing it." The president will support it "because it funds his priorities," Mulvaney said.
Yet Trump raised the prospect of a veto – and a shutdown – Friday morning in a stunning tweet before stock markets opened in the U.S.
"I am considering a VETO of the Omnibus Spending Bill based on the fact that the 800,000 plus DACA recipients have been totally abandoned by the Democrats (not even mentioned in Bill) and the BORDER WALL, which is desperately needed for our National Defense, is not fully funded," the president tweeted.
Leaders from both parties touted victories in the compromise bill, but acknowledged they made concessions. Republicans like Ryan promoted the boost to military funding and border enforcement efforts.
"What this ultimately is about is giving our military the tools and the resources it needs to do its job," he said before the House approved the bill.
Both major parties cheered increased funding to fight the opioid crisis and improve infrastructure.
Democrats touted provisions such as higher funding for child-care subsidies and low-income housing tax credits. They also got wins from what was not included in the legislation: measures championed by conservatives to pull funding for Planned Parenthood or so-called sanctuary cities.
The bill "is legislation that neither side sees as perfect, but which contains a host of significant victories and important achievements on behalf of the American people," McConnell said Thursday on the Senate floor.
Senate Minority Leader Chuck Schumer, D-N.Y., also acknowledged concessions from both major parties on Thursday.
"Now, it certainly doesn't have everything Democrats want. And it contains a few things Democrats aren't thrilled about. The same is true of our Republican friends. That is true of all compromises," Schumer said Thursday.
Here are some of the bill's notable provisions: