The US Congress, facing an end-of-week deadline, passed a funding stopgap measure Thursday that averts a government shutdown and provides lawmakers and President Donald Trump with breathing room to strike a 2018 budget deal.
The Senate easily passed the bipartisan measure that funds government until December 22, by a vote of 81 to 14.
It occurred just hours after the House of Representatives did the same.
The bill heads to the White House for the president’s signature ahead of the Friday midnight deadline. But with a shutdown crisis prevented – at least for now – a heated battle could lay ahead.
Trump will need to work with Democrats and his fellow Republicans in the coming weeks to thrash out a budget plan for fiscal year 2018 that earns the support of lawmakers battling over policy and spending priorities.
The Republican Party controls both chambers of Congress, but in the Senate they will need at least a handful of Democratic votes in order to pass the spending bill.
While the two sides share some common goals, such as funding the program that provides health insurance for millions of children, they remain divided on issues like the level of military funding compared to that for domestic programs.
Democratic and Republican leaders huddled with Trump at the White House before the Senate vote. 
‘We hope we can come to an agreement’ on 2018 spending, top Senate Democrat Chuck Schumer said.
‘We’re here in the spirit of ‘Let’s get it done.”
Senate Democrats earlier had threatened to block progress unless they won  concessions from Republicans on a number of issues, notably the fate of hundreds of thousands of young immigrants who came to the United States as children.
Trump’s predecessor, Barack Obama, protected the so-called ‘Dreamers’ from expulsion through an executive order.
Trump rescinded that order, but then told Congress to craft a legal solution within the next six months.
House Minority Leader Nancy Pelosi said passage of the Dream Act protecting young immigrants was a top priority.
But White House press secretary Sarah Sanders said Republicans were angling for separate talks on immigration.
Trump, House Speaker Paul Ryan and Senate Majority Leader Mitch McConnell ‘stressed that negotiations on immigration should be held separately on a different track, and not as part of the government funding bill,’ she told reporters.
With the Trump administration seeking to boost military spending for 2018, Pelosi said Democrats wanted to match those hikes on the domestic side.
‘Our fight is to bring up the domestic agenda to parity’ with military spending increases, she said.
Democrats supported several bipartisan priorities including funding opioid abuse prevention, improving conditions for veterans, and disaster relief funding.