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."