Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Senate leaders have reached a broad long-term spending deal just one day before the latest in a string of government shutdown deadlines.

The deal is an attempt to keep the government open and ensure that this is the last time Congress will have to pass an incremental spending bill for the remainder of the fiscal year.

The measure, negotiated between Senate Majority Leader Mitch McConnell and Senate Democratic Leader Chuck Schumer, increases domestic and military spending by $300 billion, the most significant increase in spending since before mandatory budget caps, known as sequestration, went into effect in 2011. Additionally it would provide more than $70 billion in disaster relief, increasing spending by nearly $400 billion over the next two years.

The deal already faces opposition from both parties in the House, but Congress must agree on spending levels before midnight Thursday to avoid a government shutdown.

The broad agreement, which is being hailed by both leaders as a breakthrough in bipartisanship, would end the mandatory sequester limits and add an additional $26 billion for both defense and non-defense programs in 2018 and $31 billion more in 2019.

It would bring the total increase of domestic spending to $131 billion over the next two years and $165 billion for the military over the next two years.

"The compromise we’ve reached will ensure for the first time in years our armed forces will have more of the resources they need to keep them safe," McConnell said announcing the deal Wednesday on the Senate floor.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"This budget deal will be the best thing we’ve done to our economy and our middle class in a long time," Schumer said in a speech following McConnell.

White House Press Secretary Sarah Huckabee Sanders said the administration is "supportive," of the deal, "primarily because it meets several of the things that we laid out, including ending the crisis budgeting, and also helps meet the needs of the military and defense spending."

The spending deal carves out money for a host of programs, including $6 billion for opioid treatment, $20 billion for infrastructure, $2 billion for research at the National Institute of Health, $7 billion for community health centers and $70 billion in disaster aid for hurricanes and wildfires that have wreaked havoc on California, Florida, Texas and Puerto Rico. The low-income children's health insurance program, or CHIP, would be extended for ten years instead of six, which was passed just last month. And it extends the debt limit, the maximum amount of which the government can borrow, for one year.

While Senate leaders praised the compromise legislation, House Democratic Leader Nancy Pelosi said it's something she couldn't support. She is demanding House Speaker Paul Ryan commit to addressing the Deferred Action Childhood Arrivals program, or DACA.

She put out a preemptive statement Wednesday morning and took to the House floor for a record-breaking, eight-hour speech wearing four-inch heels, reading profiles of successful Dreamers.

“The budget caps agreement includes many Democratic priorities,” Pelosi said in a statement. “This morning, we took a measure of our Caucus because the package does nothing to advance bipartisan legislation to protect Dreamers in the House. Without a commitment from Speaker Ryan comparable to the commitment from Leader McConnell, this package does not have my support.”

Ryan's spokeswoman, AshLee Strong, said, “Speaker Ryan has already repeatedly stated we intend to do a DACA and immigration reform bill — one that the president supports.”

The deal's prospects in the House are uncertain. Conservatives are slamming the deal for the massive increase in domestic spending.

"Bad, bad, bad agreement," Rep. Jim Jordan, R-Ohio, said. "And it's also terrible."

Even though he praised the deal, it is a major rebuke to President Donald Trump's priorities. His budget proposal for the current fiscal year dramatically slashed domestic spending, including for many programs that Senate leaders agreed to boost.

Even with the agreement, Congress still must pass a short-term spending bill that lasts until March 23 by midnight on Thursday because the new agreement doesn’t actually fund the government, but it creates the top-line spending levels that enables them to write the appropriations bills.

Republican senators left a conference lunch where they learned about it praising the defense boost but saying the overall package is much larger than they expected.

"I have to read through it because there's a lot in there," Sen. James Lankford, R-Okla., said.

Sen. Susan Collins, R-Maine, a moderate Republican in the Senate, said she's optimistic.

“I’m confident there’s not going to be a government shutdown, and there shouldn’t be,” Collins said. “We’re already nearly six months into the fiscal year, and it’s irresponsible of us to not finish this work.”