Trump has not yet said he will support the measure, but the White House says he’ll take a look.
It does not provide $5 billion Trump wanted for the wall. Instead, it funds border security and other agencies at current levels through Feb. 8.
Without resolution, more than 800,000 federal employees could be furloughed or ordered to work without pay days before Christmas.
Voting was pushed back to late Wednesday and some senators sang Christmas carols in the chamber.
The leader of the conservative House Freedom Caucus is urging President Donald Trump to veto a stopgap spending plan that would avoid a partial government shutdown set to begin early Saturday.
Rep. Mark Meadows, a North Carolina Republican, said Trump’s political base “will just go crazy” if he signs a spending bill that does not include money for his long-promised border wall with Mexico, a central part of Trump’s 2016 campaign.
Just last week Trump said he would be “proud” to shut down the government over his demand for $5 billion for the wall.
Meadows says signing a bill without wall funding would do “major damage” to Trump’s re-election campaign, saying Trump’s supporters “believe it’s a promise that he’s been telling them that he will keep.”