US Senate leaders said Wednesday they had reached a bipartisan budget deal for 2018 and 2019 – a move which, if approved by Congress, would avert a looming government shutdown.
The agreement, months in the making, was a major achievement for both the ruling Republicans and opposition Democrats in a deeply divided Congress.
It would lift caps on military and non-military spending that were congressionally mandated back in 2011, and which both parties warned were hamstringing the US military. 
The elusive deal comes on the eve of a midnight Thursday deadline for federal spending, with the government hours away from tumbling into another shutdown if lawmakers do not pass a temporary spending bill.
‘The compromise we’ve reached will ensure that, for the first time in years, our armed forces will have more of the resources they need to keep America safe,’ Senate Majority Mitch McConnell said on the Senate floor.
It would also ensure funding for domestic priorities like disaster relief, infrastructure, and fighting a surging opioid epidemic.
McConnell and top Senate Democrat Chuck Schumer said the deal was the product of extensive negotiations between both parties and the White House.
‘Later this week, let’s pass this budget into law alongside an extension of government funding,’ Schumer said. ‘I hope the House will follow suit and President Trump will sign it.’
The White House reacted positively to the news from Capitol Hill. 
‘We’re certainly happy with the direction that it’s moving,’ press secretary Sarah Sanders said, adding that the White House would need to see the final components.
The expectation is that the agreement’s language would accompany a stopgap spending measure to fund government for the next six weeks, allowing federal appropriators to work up the official budget language.
But the compromise could face stiff blowback in the House, where fiscal conservatives may balk at greenlighting what is reported to be some $200 billion or more in new federal spending. 
Liberal stalwarts might also revolt, over the sensitive issue of immigration.
Immigration at issue
Lawmakers and the White House have negotiated at length over the fate of millions of undocumented migrants, but the immigration issue is not in the latest compromise agreement.
Instead, McConnell has pledged to allow an open debate on possible immigration solutions on the Senate floor, beginning as early as next week – a promise he made to end a three-day shutdown last month.
Before the deal was announced, the House had passed a partisan bill that would fund government for six weeks – but fund the military through the remainder of fiscal year 2018.
The Senate is now expected to rewrite that measure, pass it and send it back for House approval by Thursday.
But President Donald Trump’s provocative outburst that he would ‘love to see a shutdown’ if he did not get his way on immigration – just as lawmakers sought to reach an understanding that would keep the lights on in Washington – sent aides scrambling to downplay his remarks.
‘We are not advocating for the shutdown,’ insisted Sanders. ‘The president wants a long-term deal, and he wants to get a deal on immigration.’
Deadline looming
Democrats have long pursued a strategy to tie immigration to the debate over federal funding – and last month implicitly threatened to bring government to a standstill absent a permanent solution for hundreds of thousands of immigrants who were brought to the country illegally as children.
The so-called ‘Dreamers’ were shielded from deportation under the Obama-era program called Deferred Action for Childhood Arrivals. But Trump ended the program last September, and set March 5 as a deadline for resolving the issue.
With less than a month before the DACA deadline, no solution was in sight.
The White House plan – which would put 1.8 million immigrants on a path to citizenship, boost border security, and dramatically curtail legal immigration – has been panned by Democrats. A series of bipartisan efforts have stalled.
Top House Democrat Nancy Pelosi was again demanding action on immigration from House Speaker Paul Ryan in order to get her support for the budget deal.
It remained unclear how many in Pelosi’s party would follow her lead.