CAPITOL HILL --- One day before a threatened U.S. government shutdown, Senate leaders on Wednesday struck a bipartisan deal that would keep the federal government funded for two years but left contentious immigration topics unaddressed.

“I’m pleased to announce that our bipartisan, bicameral negotiations on defense spending and other priorities have yielded a significant agreement,” Majority Leader Mitch McConnell, a Kentucky Republican, said on the Senate floor.

“We came together with an agreement that is very good for the American people,” Democratic Minority Leader Chuck Schumer of New York said. “After months of legislative logjams, this budget deal is a genuine breakthrough.”

The package would boost U.S. government spending on national defense and domestic programs by $300 billion over a two-year period, ending years of mandatory budget caps Republicans argued were hollowing out America's military and Democrats said were harming the needy.

“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,” McConnell said. “It will help us serve the veterans who’ve bravely served us, and it will ensure funding for important efforts such as disaster relief, infrastructure, and building on our work to fight opioid abuse.”

Senate leaders were racing against the clock, with federal funding set to expire at midnight Thursday. Unless spending authority is extended, the U.S. government will suffer its second partial shutdown in as many months.

The agreement gives Congress six weeks to appropriate funds that are in line with spending levels set forth in the agreement. To become law, it would have to pass both houses of Congress and be signed by President Donald Trump.

Initial White House reaction to the deal was optimistic but noncommittal.

“We applaud the steps forward that they (congressional leaders) have made, but we are going to need to see what is in the final bill,” White House Press Secretary Sarah Huckabee Sanders said at the daily press briefing. “We’re certainly happy with the direction that it’s moving, particularly that we’re moving away from the crisis budgeting that we've been on.”

The funding deal was expected to draw opposition from Republican ultra-conservative fiscal hawks and was dismissed beforehand by some Democrats who are demanding congressional action to protect from deportation hundreds of thousands of young undocumented immigrants brought to America as children.

House Minority Leader Nancy Pelosi, a California Democrat, announced she would withhold support for the funding deal until Republican Speaker of the House Paul Ryan commits to a floor vote to address the plight of beneficiaries of Deferred Action for Childhood Arrivals (DACA).

“What are you afraid of?” Pelosi asked of Ryan in a lengthy speech on the House floor. “Give us a vote. Let the House work its will.”

Democrats blocked a stopgap spending bill in January, triggering a three-day federal shutdown, in part to protest Congress' inaction on DACA, an Obama administration program Trump set to expire March 5.

The president has said he supports a path to citizenship for 1.8 million youth eligible for DACA as part of a larger immigration reform package. The White House is also demanding funding for a wall along the U.S.-Mexico border, a reduction in legal immigration to the United States, and prioritizing newcomers with advanced work skills.

Bipartisan negotiations have yet to reach a deal on an overhaul of America's immigration laws, and Trump has rejected a proposal that would pair a DACA solution with limited border security enhancements.

After hailing the funding accord, McConnell restated his intention to start floor debate on immigration reform, including a fix for DACA recipients.

“Our upcoming debate on DACA, border security and other issues will be a process that is fair to all sides,” he said. “While I obviously cannot guarantee any outcome, I can ensure the process is fair. And that I intend to do.”