The House passed a bill Friday to set up a major spending increase and end a brief government shutdown, sending it to President Donald Trump for his signature.
Both chambers of Congress passed a short-term funding bill and cleared the way for a boost to military and domestic spending hours after funding lapsed at midnight. The government partially shut down for the second time in less than a month.
The massive legislation cleared Congress after opposition delayed or threatened its passage in both chambers. The House narrowly passed the budget bill by 240 to 186 before dawn Friday.
Resistance to the plan came from the House's conservative and liberal wings. Some GOP conservatives objected to increased spending. Meanwhile, House Minority Leader Nancy Pelosi and other Democrats criticized the lack of a provision to protect hundreds of thousands of young immigrants from deportation.
"Democrats worked hard to achieve a bipartisan agreement and gave our assurances to the Speaker that we were not interested in shutting down government," Pelosi said in a statement after the vote. "In return, the Speaker refused to make a real commitment to schedule a vote to protect the Dreamers who have the overwhelming support of the American people and a bipartisan majority in the House."
Hours earlier, the Senate approved the measure by a 71-28 vote following Sen. Rand Paul's repeated attempts to block the vote. The Kentucky Republican opposed the spending increases contained in the agreement and wanted to vote on an amendment to maintain budget caps.
The bill would set up a two-year, $300 billion boost in spending on military and domestic programs. It would also extend the debt ceiling, authorize nearly $90 billion more in aid for last year's string of natural disasters, give funding to fight the opioid crisis and extend the popular Children's Health Insurance Program for an additional four years.
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:
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.
Though the bill ends a short government shutdown, the fate of immigration legislation is unclear. The Senate will have an open floor process on immigration plans next week, though lawmakers have not expressed optimism about crafting a plan that can get 60 votes.
Even if the Senate passes its own plan, it is unclear if it can garner the votes needed to clear the more conservative House.
Ryan committed to bringing up an immigration bill, but only after the budget agreement passed. He did not meet Pelosi's demands, as he reiterated that he will bring up a bill "that the president will sign."
Drafting a plan that meets Trump's demands and appeases Democrats could prove difficult. Trump has called for stricter limits on extended family migration, an end to the visa "lottery" system and a wall along the Mexican border, which the minority party has opposed.