Congressional leaders have reached a breakthrough tentative budget deal with the White House that would set government funding levels for the next two years and extend the nation’s debt limit through 2017, avoiding routine talks of a government shutdown.

The 144-page bipartisan funding bill, labeled a “discussion draft,” was posted online just before midnight setting up a potential vote in the House as early as Wednesday.

If approved, the agreement would be a milestone after years of gridlock and annual threats of government shutdowns.

WATCH: Congress nears ‘barn cleaning’ budget deal as Boehner departs

Republicans will meet again in a closed door meeting Tuesday morning to continue discussions.

“I think it’d be helpful for the whole conference,” House Majority Leader Kevin McCarthy said about passing a deal addressing both the debt limit and budget before a new speaker is elected Thursday.

Government funding is set to expire on Dec. 11, while the debt limit deadline is Nov. 3, according to the Treasury Department.

The bill would set spending levels through September of 2017 in an effort to return to the regular government funding process, a deal aides say would raise the spending caps set in place in 2011, which would have resulted in deep cuts to both defense and non-defense spending, called sequestration.

This deal would provide $80 billion in sequester relief — $50 billion the first year and $30 billion in the second equally divided between defense and non-defense spending. Close video US budget deficit smallest in 8 years Rachel Maddow reports that the annual US budget deficit is the smallest it has been since 2007. Rachel Maddow reports that the annual US budget deficit is the smallest it has been since 2007. share tweet email Embed

“We’d like to settle the topline for both years so that next year we could have a regular appropriations process,” Senate Majority Leader Mitch McConnell, R-Kentucky, told reporters on Sept. 29.

Speaker John Boehner — who resigns from congress at the end of this week — told NBC News Monday that by pushing through this deal he was “cleaning out the barn.”

The deal is likely going to need Democratic votes to pass the House, but some moderate Republicans, defense hawks and appropriators will likely find many parts of the deal to their liking. The bipartisan agreement would include long-term entitlement reforms to the Social Security Disability Insurance (SSDI) program — the first major reform to Social Security since 1983.

It also prevents a spike in Medicare B premiums for millions of seniors, a source familiar with the negotiations said. House Democratic Leader Nancy Pelosi, D-California, has been advocating for a change to this program.

Sen. John McCain, R-Arizona, who chairs the Senate Armed Services Committee, said that while the increase in defense spending was not enough, he feels he could likely support the deal.

“I think it’s saleable, my concern is defense,” McCain told reporters, “I think that we could move forward with this, it averts a shutdown, it puts any of these problems into two years from now, so I think it’s the best deal we can get.”

RELATED: Congress is back – and it has a massive to-do list

The Senate is currently scheduled to finish a cyber-security bill on Tuesday evening, and McConnell’s office says the rest of the week has been left open so that they can consider a possible raise in the debt limit, a budget deal, or both.

White House Press Secretary Josh Earnest would not give out any details on the “progress that is being made” on the budget discussions during his daily press conference. But he noted that “we’ve said all along that a budget deal will only be yielded if Democrats and Republicans on Capitol Hill sit down and work together in good faith to try and reach a compromise.”

Earnest added Monday: “The White House has been involved in a substantial number of conversations.”

The tentative deal is a byproduct of bipartisan negotiations with the White House which began on Sept. 17, and aides say that any increases in defense spending included in the deal will be met with equal increases for non-defense programs, a key Democratic priority.

“As I’ve been saying for a long, long time, it’s past time that we do away with the harmful draconian sequester cuts,” Senate Minority Leader Harry Reid, a Democrat from Nevada, said Monday on the Senate floor, “We must also ensure that there’s equal defense and non-defense cuts or increases — need to be equal.”

If the proposed deal is passed by Congress, it would then set spending levels so that the appropriations committees in both the House and Senate could craft legislation to fund the various departments of the government. By agreeing to spending levels two years in advance, Congress would theoretically avoid the spending fights that have resulted in short-term stop-gap funding bills that Congress has passed in recent years.

A House aide notes that coupled to this budget package would be a clean suspension of the debt limit until March 2017. GOP leaders in both the House and Senate have been highly skeptical that a “clean” debt limit bill could pass either chamber and are hopeful attaching the entitlement reforms and offsets included in the budget agreement could make the deal more appealing.

A deal that would push budget negotiations and debt limit talks past 2016 would immensely help the likely next speaker of the House, Rep. Paul Ryan, R-Wisconsin, who is expected to be elected this week.

Putting off future fights regarding government funding until 2017 would allow Ryan the ability to get a handle on the position and the conference before having to chart a path forward. It was Ryan — along with Sen. Patty Murray, D-Washington — that negotiated the last budget compromise back in December 2013.

This article first appeared on NBCNews.com.