The US government partial shutdown is ending after Republicans and Democrats voted for a temporary funding bill.
The Democratic leadership agreed to back the bill after accepting promises from Republicans for a debate later on the future of young illegal immigrants.
President Donald Trump, who signed the bill on Monday evening, took a swipe at Democrats.
It is the fourth temporary measure since October because Capitol Hill cannot agree a longer-term budget.
The spending bill passed the Senate by 81-18 and the House of Representatives by 266-150 earlier on Monday.
The so-called continuing resolution keeps the government funded until 8 February in the hope that Congress can reach a longer-term budget agreement in the meantime.
Thousands of federal employees who had been placed on temporary, unpaid leave since Saturday breathed a sigh of relief.
Republican Senate leader Mitch McConnell said his party had "come to an arrangement" to negotiate on their calls for an immigration deal.
Democrats want protections from deportation for so-called Dreamers, more than 700,000 young immigrants brought to the US as children.
But Republicans had insisted no agreement was possible while federal government services were closed, reports BBC.