A new confrontation was, however, ignited - this time over US President Donald Trump's plan to bypass lawmakers and declare a national emergency to siphon billions from other federal coffers for his wall on the Mexican boundary.
Money in the bill for border barriers, about 1.4 billion US dollars, is far below the 5.7 billion US dollars Trump insisted he needed to build a wall along the Mexican boundary and would finance just a quarter of the 200-plus miles he wanted.
The White House said he'd sign the legislation but act on his own to get the rest, a move that prompted immediate condemnation from Democrats and threats of lawsuits from states and others who might lose federal money or said Trump was abusing his authority.
Before the vote, members of congress debated the bill.
Republican Chuck Fleischmann said the compromise didn't go as far as he would have liked but was one that both the American public and "the vast majority of members in both Houses can support."
John H Rutherford, of the Republican party, called it "not a loss" for Trump but "a win" for the Department of Homeland Security and a step in the right direction for border security.
Democrat Pete Aguilar meanwhile said the agreement was a bipartisan effort that would keep government running and protect national security.
Debbie Wasserman Schultz, however, lambasted Trump's plan to declare a national emergency, calling it a "lawless end run around Congress (that) is a craven act built on lies and distraction."
Also read- California storm water damages roads, levees
(With inputs from APTN)