Trump, who said earlier this week he would "love" a government shutdown, was expected to sign the measure into law. He signaled his support for it in a tweet on Wednesday.
"The Budget Agreement today is so important for our great Military," Trump wrote. "It ends the dangerous sequester and gives Secretary Mattis what he needs to keep America Great. Republicans and Democrats must support our troops and support this Bill!"
In a statement Friday morning, House Speaker Paul Ryan called the budget deal "a great victory" for military service members.
"Ultimately, neither side got everything it wanted in this agreement, but we reached a bipartisan compromise that puts the safety and well-being of the American people first," he said.
The legislation funds the government through March 23 while lawmakers work on an appropriations bill with the levels set out by Congress. Congress will then have to pass appropriations legislation for the current fiscal year that ends Sept. 30 and the following year.
The deal includes:
- A $165 billion increase in military spending;
- A $131 billion boost to domestic program spending;
- Nearly $90 billion in funding for disaster relief efforts in Texas, Florida and Puerto Rico;
- Two years of funding for community health centers;
- Another four-year extension of the Children's Health Insurance Program, for a total of a decade;
- Funding for existing infrastructure programs related to transportation, drinking water and broadband.
The budget deal's passage faced real threats on Wednesday and Thursday. Pelosi said she would vote against the bill unless Ryan gave assurances that he would allow an open debate on immigration legislation. Other Democrats followed suit.
Self-professed fiscal hawks in the House also pushed back against the bill. House Freedom Caucus member Rep. Jim Jordan, R-Ohio, called it a "monstrosity."
Similar concerns surfaced Thursday in the Senate, as several fiscal hawks voted against it. Paul mounted the most serious opposition, leading Senate Majority Whip John Cornyn to say he would "effectively shutdown the federal government for no real reason."
"I can't in all good honesty, in all good faith, just look the other way because my party is now complicit in the deficits," Paul said on the Senate floor hours before the chamber voted.