Senate leaders from the two parties reached a deal on a two-year budget deal that minority leader Sen. Charles Schumer hailed as a 'genuine breakthrough.'

The deal, which is not finalized, came just as government funding was set to expire at the end of the week.

It pumps nearly $300 billion into defense and domestic programs above current budget limits.

'After months of fiscal brinkmanship this budget deal is the first real sprout of bipartisanship and it should break the long cycle of spending crises that have snarled this congress and hampered the middle class,' said Schumer on the Senate floor after his counterpart, majority leader Mitch McConnell, announced the deal.

The deal 'will ensure that for the first time in years our armed forces will have more of the resources they need to keep America safe,' said McConnell.

'No one would suggest it is perfect,' McConnell added.

Lawmakers are furtively working on another, short-term spending agreement as a shutdown circles once more over the U.S. Capitol

He said it will 'unwind the sequestration cuts that have hamstrung our armed forces and jeopardized our national security.'

The plan also contains almost $90 billion in overdue disaster aid for hurricane-slammed Texas, Florida and Puerto Rico.

The deal repeals spending caps put in place during a previous budget deal – the so-called sequester that became loathed by members of both parties.

Any deal would still have to make it through the House, where GOP conservatives were already slamming it as a bad deal. House Democrats have already grumbled that it does not include a deal to protect DACA recipients.

But McConnell provided new assurances for how an upcoming immigration debate will proceed.

Senate Minority Leader Chuck Schumer of N.Y., center, accompanied by Sen. Bob Casey, D-Pa., at left, speaks on Capitol Hill, Tuesday, Feb. 6, 2018 in Washington. (AP Photo/Alex Brandon)

He promised it would have an 'amendment process that will ensure a level playing field at the outset' and be 'fair to all sides,' though he stopped short of guaranteeing any outcome.

While McConnell touted the boost to the military, Schumer lauded other spending increases in infrastructure and other areas.

He said the deal would allow for a $131 increase in domestic non-defense spending by lifting the cap. That includes $57 billion in additional funds including $6 billion to fight the opioid crisis, $5.8 billion for childcare block grants, $4 billion for veterans' hospitals, and $20 billion for existing infrastructure programs.

The deal also includes disaster relief for states and territories that got socked by hurricanes.

Senate Majority Leader Sen. Mitch McConnell (R-KY) (L) walks towards the Senate chamber at the Capitol February 7, 2018 in Washington, DC

Speaker of the House Paul Ryan, R-Wis., left, and Majority Leader Kevin McCarthy, R-Calif., confer as they arrive to meet with reporters following a closed-door GOP strategy session at the Capitol in Washington, Tuesday, Feb. 6, 2018. The GOP-controlled House is slated Tuesday to pass a plan to keep the government open for six more weeks while Washington grapples with a potential follow-up budget pact and, perhaps, immigration legislation

The House's top Democrat, however, swung out against the plan.

House Minority Leader Nancy Pelosi of California announced she would oppose the budget measure unless her chamber's GOP leaders promised a vote on legislation to protect "Dreamer" immigrants who face deportation after being brought to the U.S. illegally as children.

The House on Tuesday passed legislation to keep the government running through March 23, marrying the stopgap spending measure with a $659 billion Pentagon spending plan, but the Senate plan would rewrite that measure.

Schumer, in his floor remarks, called on House Speaker Paul Ryan would follow McConnell's lead and 'allow a fair and open process to debate a dreamers bill on the house floor.'

'Without that commitment from Speaker Ryan comparable to the commitment from leader McConnell, this package does not have my support,' Pelosi said on the House floor, referring to a DREAMers bill.

Senate Majority Leader Mitch McConnell, R-Ky., smiles as he meets with reporters as work continues on a plan to keep the government as a funding deadline approaches, at the Capitol in Washington, Tuesday, Feb. 6, 2018

The deal also raises the federal statutory debt ceiling.

Senate Democratic leaders dropped their strategy of using the funding fight to extract concessions on immigration, specifically on seeking extended protections for the "Dreamer" immigrants.

Instead, Schumer went with a deal that would reap tens of billions of dollars for other priorities - including combatting opioids - while hoping to solve the immigration impasse later.

Lawmakers were simultaneously furtively working on another, short-term spending agreement as a shutdown circles once more over the U.S. Capitol.

The House passed a six-week stopgap measure on Tuesday that fully funds the military for an entire year, fulfilling a budgetary request of the president's.

Senate Majority Leader Mitch McConnell walks to the Senate chamber on Capitol Hill in Washington, U.S. February 7, 2018

But senators have other designs for bill that would keep the government running beyond the Thursday deadline until March 23. They're considering a $100 billion rider for disaster relief and debt ceiling hike that will get legislators past that hump until after the November elections.

President Donald Trump nearly derailed a deal on Tuesday as he fumed about Democrats' rejection of his immigration compromise. 'Let's have a shutdown,' he said.

Trump said that Republicans should force a government shutdown unless Democrats agree to all of his immigration demands during a roundtable in which he railed against 'loopholes' in the law that have been taken advantage of by a violent, transnational gang of immigrants.

'Let's have a shutdown. We'll do a shutdown and it's worth it for our country. I'd love to see a shutdown if we don't get this stuff taken care of,' Trump said.

Democrats dropped an earlier bid to hold up government funding unless an immigration deal is brokered after a spending fight with Republicans led to a three-day shutdown in January.

As agreement between Senate Democratic leader Chuck Schumer and Senate Majority Leader Mitch McConnell necessitates an open debate in the upper chamber on immigration reforms next week.

Trump has slapped down every recent immigration proposal to arise in the Senate, however. Typically, because they have not included the desired funding for his border wall.

Now Trump says he'd be willing to ride out a shutdown to get what he wants out of immigration negotiations.

'I would shut it down over this issue,' Trump said Tuesday. 'I can't speak for everybody at the table but I will tell you, I would shut it down over this issue.'

President Donald Trump said Tuesday that Republicans should force a government shutdown unless Democrats agree to close 'loopholes' that allow immigrant gang members to enter the country

Continuing, Trump said, 'If we don't straighten out our border, we don't have a country. Without borders we don't have a country. So would I would shut it down over this issue? Yes.

'I can't speak for our great representatives here but I have a feeling they may agree with me,' he added.

Republican Congresswoman Barbara Comstock, who was present at the meeting, made her position clear after Trump's original assertion that he'd 'love' a shutdown.

'We don't need a government shutdown on this,' she said.

The president fired back: 'We are not getting support from the Democrats.'

The president's spokeswoman, Sarah Huckabee Sanders, claimed that Trump is 'not advocating' for a shutdown at a press conference immediately after.

'The president isn't looking for this, but if the Democratic Party is going to continue to threaten a shutdown because they won't include responsible immigration reforms, including fixing MS-13 loopholes and other issues,' Sanders said, 'then the president welcomes that fight.'

'But let me repeat, our goal is to get a two-year budget deal and to also get a deal on immigration, which we have laid out. The president has generously laid out a plan that addresses both Republicans and Democrats' concerns, and we're hopeful we'll come to an agreement on both of those fronts.'

Sanders reminded that to this point, 'The only people that have caused a shutdown are the Democrats who have repeatedly held the government hostage over their politics.

'Democrats actually shut the government down. Let's not forget that, just a couple weeks ago,' she said, referring to the funding lapse in January.

His blast about a shutdown came on a day when Senate Minority Leader Charles Schumer huddled with Senate Majority Leader Mitch McConnell in delicate talks over agreeing to raise spending caps on non-defense areas of government spending.

The House would later pass, mostly along party lines in a 245-182 vote, a six-week measure that the White House's Office of Management and Budget said the president would support.

In his rant Tuesday, the president had specifically mentioned military spending as a sticking point in addition to immigration.

'If we have to shut it down because the Democrats don't want safety, and unrelated – but still related – they don't want to take care of our military, then shut it down. We'll go with another shutdown,' he said.

An emerging agreement in the Senate would add disaster spending to the package and deal with the debt ceiling, which is also due for an increase in March.

The behemoth package will let lawmakers off the hook when it comes to raising the debt limit until after they face voters in the midterm elections.

Trump had not taken a stance on the Senate's package as of this morning.