The House and Senate were on track Thursday to pass legislation that funds the government through late March, and allows unlimited federal borrowing for one year.

It's the first of two steps that should, by next month, result in passage of a second bill that creates a two-year spending plan, and ends the need for more short-term spending bills, at least through the end of fiscal year 2019.

Opposition from conservative deficit hawks and progressive Democrats won’t be enough to block the Thursday vote on what lawmakers hope is the last temporary extension, through March 23. That six-week extension would give Congress enough time to write legislation to accommodate a second accord on an omnibus spending package that would fund the federal government until the end of the fiscal year, which is Sept. 30.

The short-term bill also includes more than $80 billion in disaster relief aid for states and territories damaged by wildfires and hurricanes last year.

After months of spending battles that culminated in a brief partial government closure in January, Senate Democrats and Republicans struck an agreement Wednesday to end the fighting. They agreed to raise federally mandated spending caps for both domestic and military budgets by $37 billion and $54 billion over two years, respectively.

The broad outlines of that spending cap agreement will be codified in Thursday's short-term spending bill, although the money will not be fully appropriated until the omnibus is written next month.

More significantly, Democrats agreed to drop a demand that spending legislation include a provision to protect so-called Dreamers from deportation.

In exchange, Majority Leader Mitch McConnell, R-Ky., pledged to bring up immigration reform vote a vote next week, although it is not clear any proposal can win the 60 votes needed for passage.

Proponents of the budget deal said it would finally provide adequate and reliable funding for the military after years of spending reductions caused by the 2011 Budget Control Act. Funding shortages have been blamed for a string of deadly military accidents this past year.

“I am confident that no senator on either side of the aisle believes this is a perfect bill,” McConnell said Thursday. “But I’m also confident this is our best chance to begin rebuilding our military and make progress on issues directly affecting the American people.”

“It doesn’t include everything that Democrats want, nor everything that Republicans want, but it’s a good deal for the American people, and it’s a strong signal that we can break the gridlock that has overwhelmed this body and work together for the good of the party,” Minority Leader Chuck Schumer, D-N.Y., said Wednesday.

The short-term legislation includes a host of healthcare-related provisions, including a two-year extension of funding for community health centers.

The Senate is expected to approve the bill Thursday afternoon and will send it to the House, where it is expected to pass with bipartisan support and despite bipartisan opposition.

Among those opposed are the vast majority of the House Freedom Caucus, a faction of the most conservative Republican lawmakers. Caucus Chairman Mark Meadows, R-N.C., told the Washington Examiner he expects only two or three of the nearly three-dozen members of the HFC will back the bill.

Republican opponents say the bill spends too much and provides a blank check to the Treasury to rack up more debt over the next year rather than providing a monetary limit to the debt ceiling.

Speaker Paul Ryan, R-Wis., defended the deal Thursday and said much of the spending, such as the disaster relief package, is not recurring and is part of the federal government's duty.

“This is a bipartisan bill,” Ryan said “Just like Leader Schumer said, you get some things you like, you give the other side things they like. That's what bipartisan compromise is all about. And I think on the net, this is a very good solution.”

Many Democrats are also expected to vote against it because it does not include the Dreamers protections.

House Minority Leader Nancy Pelosi, D-Calif., spent a record eight hours on the House floor Wednesday advocating for a deal to protect the Dreamers, who came here illegally as children and face deportation after an Obama-era program expires on March 5.

Ryan said he plans to take up an immigration reform bill President Trump is willing to sign, which means it will have to include border security and other immigration reform provisions including limits to chain migration and an end to the visa lottery system.