Updated

House Republican leaders have unveiled a tentative two-year budget agreement with the Obama White House aimed at preventing a partial government shutdown and forestalling a debt crisis.

The text of the deal was posted to the House Rules Committee's website late Monday, setting up a final debate and vote on the plan Wednesday. Sources told Fox News the House GOP leadership will likely require the support of almost all House Democrats and between 90 and 100 Republicans to see the agreement through.

The measure was to be discussed further at a GOP meeting Tuesday morning.

The budget pact, coupled with a must-pass increase in the federal borrowing limit, would solve the thorniest issues awaiting Rep. Paul Ryan, R-Wis., who is set to be elected Speaker of the House on Thursday. However, sources told Fox that conservatives opposed to Ryan as speaker may use the proposed budget as a reason to vote against the House Ways and Means committee chair. Not enough members were expected to defect to imperil Ryan's ultimate election.

The deal would also take budget showdowns and government shutdown fights off the table until after the 2016 presidential election, a potential boon to Republican candidates who might otherwise face uncomfortable questions about messes in the GOP-led Congress.

Congress must raise the federal borrowing limit by Nov. 3 or risk a first-ever default, while money to pay for government operations runs out Dec. 11 unless Congress acts. The emerging framework would give both the Pentagon and domestic agencies two years of budget relief of $80 billion in exchange for cuts elsewhere in the budget.

Outlined for rank-and-file Republicans in a closed-door session Monday night, the budget relief would total $50 billion in the first year and $30 billion in the second year.

"Let's declare success," House Majority Leader Kevin McCarthy, R-Calif., told Republicans, according to Rep. David Jolly, R-Fla., as the leadership sought to rally support for the emerging deal.

A chief selling point for GOP leaders is that the alternative is chaos and a stand-alone debt limit increase that might be forced on Republicans. But conservatives in the conference who drove Boehner to resign were not ready to fall in line.

"This is again just the umpteenth time that you have this big, big, huge deal that'll last for two years and we were told nothing about it, and in fact even today, were not given the details" said Rep. John Fleming, R-La. "And we're probably going to have to vote on it in less than 48 hours."

"I'm not excited about it at all," said Rep. Matt Salmon, R-Ariz. "A two-year budget deal that raises the debt ceiling for basically the entire term of this presidency."

The agreement was panned by two prominent conservative groups, Heritage Action and the Club for Growth. The two organizations issued a joint statement saying the deal was "brokered by a lame-duck speaker and a lame duck president [and] represents the very worst of Washington – a last minute deal that increases spending and debt under the auspices of fiscal responsibility."

The measure under discussion would suspend the current $18.1 trillion debt limit through March 2017. The budget portion would increase the current "caps" on total agency spending by $50 billion in 2016 and $30 billion in 2017, offset by savings elsewhere in the budget. And it would permit about $16 billion to be added on top of that in 2016, classified as war funding, with a comparable boost in 2017.

Among the proposed spending cuts are curbs on Medicare payments for outpatient services provided by hospitals that have taken over doctors' practices, and an extension of a 2 percentage-point cut in Medicare payments to doctors through the end of a 10-year budget.

The budget side of the deal is aimed at undoing automatic spending cuts which are a byproduct of a 2011 budget and debt deal and the failure of Washington to subsequently tackle the government's fiscal woes. GOP defense hawks are a driving force, intent on reversing the automatic cuts and getting more money for the military.

The focus is on setting a new overall spending limit for agencies whose operating budgets are set by Congress each year. It will be up to the House and Senate Appropriations committees to produce a detailed omnibus spending bill by the Dec. 11 deadline.

There's also a drawdown from the Strategic Petroleum Reserve, reforms to crop insurance, and savings reaped from a Justice Department funds for crime victims and involving assets seized from criminals.

The legislation also would clean up expected problems in Social Security and Medicare by fixing a shortfall looming next year in Social Security payments to the disabled, as well as a large increase in Medicare premiums and deductibles for doctors' visits and other outpatient care.

The deal, which would apply to the 2016-17 budget years, resembles a pact that Ryan himself put together two years ago in concert with Sen. Patty Murray, D-Wash., that eased automatic spending cuts for the 2014-15 budget years. A lot of conservatives disliked that measure.

"It is past time that we do away with the harmful, Draconian sequester cuts," said Senate Minority Leader Harry Reid, D-Nev. "We must also ensure that there are equal defense and nondefense increases."

The deal would make good on a promise Boehner made in the days after announcing his surprise resignation from Congress last month. He said at the time: "I don't want to leave my successor a dirty barn. I want to clean the barn up a little bit before the next person gets there."

Some of the more moderate Republican members welcomed the emerging deal and applauded Boehner.

"The outline that was presented seems like a path forward," said Rep. Charlie Dent, R-Pa. "He said he was going to try to clean the barn and this is a good start."

Fox News' Chad Pergram and the Associated Press contributed to this report.