In the end, following the brief shutdown, the Senate approved the bill 73-26, with the House voting 240-186.
Rand Paul (R-KY), who single-handedly blocked action in the Senate before a midnight funding deadline, as he criticized fellow Republicans for backing a two-year budget deal which features nearly $300 billion in spending increases in 2018 and 2019.
President Donald Trump must signed the bill early Friday, ending the shutdown after less than nine hours.
But those arguments failed, as a majority of both parties voted 71-28 at 1:52 am to approve the two-year budget deal unveiled on Wednesday, which included full funding for the military, and temporary funding for the rest of the federal government through March 23.
The bill is opposed by House Democratic leader Nancy Pelosi because Republican House leaders will not guarantee her that they will allow a debate later on about taking steps to protect some 700,000 "Dreamer" immigrants from deportation.
Once known as the party of fiscal conservatism, the Republicans and Trump in December added an estimated $1.5 trillion to the national debt with a tax overhaul bill, their only significant legislative achievement of 2017. The federal government briefly shuttered for the second time in less than a month overnight, after Kentucky Republican Sen.
"We have Republicans hand-in-hand with Democrats offering us trillion-dollar deficits", Paul said on the Senate floor Thursday night.
It also would increase the government's debt cap, preventing a first-ever default on US obligations that looms in just a few weeks. "Sadly, we needed some Dem votes for passage", he tweeted.
Kim Jong Un invites South Korean president for summit
Tensions between the U.S and North Korea intensified during the past year, raising worries of armed conflict on the peninsula. So far, the South Korean President seems keen to take up his North Korean counterpart's offer, which comes as no surprise.
The House was expected to take up the bill sometime between 4 and 6 a.m.
The Senate also approved the measure earlier on Friday morning. Lindsey Graham, R-S.C., another senator leading the DACA talks, has criticized White House aides like Stephen Miller for what he calls Trump's shifting targets for an immigration bill.
Trump also wrote that negotiations will "start now!" on an immigration measure that he and Democrats have been battling over for months. For some Republicans, the problem was spending, specifically too much of it. But their opportunities to extract concessions are waning, and unless the bill that comes out of the Senate is assured a vote, Democrats may have just let go of a key piece of influence they had over the eventual immigration product.
In the end, however, Democrats declined to hold the spending bill hostage over immigration. "But I would say, really, primarily, this is coming from Congress. Leadership in Congress in both the House and Senate has chose to move forward".
"He needs us", she said. We must pass this budget agreement first, though, so that we can get onto that.
"If we get one amendment up, you can imagine other people are going to have amendments", he said.
Democrats have sought to link the funding debate to a permanent solution for the "Dreamers", who were shielded from deportation under an Obama-era program which ended last September by Trump, who set a March 5 deadline for resolving the issue.