A campaign to persuade the Republican-led House to lift the federal debt limit collapsed in messy failure Tuesday, leaving Washington careering toward a critical deadline, just two days away, with no clear plan for avoiding a government default.

Senate leaders moved quickly to pick up the pieces, saying they were "optimistic" that they could strike a deal to advance an alternative proposal that would raise the debt limit through Feb. 7 and end a government shutdown, now in its third week.

But it was unclear whether an agreement between Senate Majority Leader Harry Reid, D-Nev., and Minority Leader Mitch McConnell, R-Ky., could pass the Senate before the Treasury Department exhausts its borrowing power Thursday.

Meeting that deadline would be impossible if Sen. Ted Cruz, R-Texas, or other conservative hard-liners chose to throw up roadblocks, Democrats said. Sen. John Thune, R-S.D., said Republican leaders were leaning on Cruz and his allies to avoid unnecessary delays.

Meanwhile, any bill passed by the Senate would have to go back to the House, where Speaker John Boehner, R-Ohio, and his leadership team showed once again that they had lost all control of their majority.

After trying all day, with increasing desperation, to cobble together a debt-limit plan that could win the support of 217 Republicans, Boehner and his top deputies gave up and abruptly canceled a scheduled vote on the measure Tuesday evening and left the Capitol without further plan or explanation.

"We are done for the night," a weary Majority Whip Kevin McCarthy, R-Calif., said as he left a marathon session in Boehner's office that began as an airing of complaints from recalcitrant conservatives and soon ballooned into a full-blown emergency session of senior lawmakers and committee chairmen.

The chaos on Capitol Hill was already reverberating through the financial world. U.S. financial markets closed down slightly Tuesday, while Fitch Ratings, the third-largest credit-rating agency, took a step toward a potential downgrade of the government's AAA rating. Fitch warned that "political brinksmanship and reduced financing flexibility" were elevating the risk of default.

Unless Congress acts by Thursday, Treasury Secretary Jack Lew will be left with just $30 billion in cash and a fluctuating flow of incoming tax revenue to pay the nation's bills. While Lew is unlikely to begin missing payments immediately, independent analysts say he would run short of funds no later than Nov. 1.

Sen. Richard Durbin, D-Ill., told reporters that aides to the two Senate leaders would work through the night to finalize details of the emerging Senate measure. "They had a basic agreement," Durbin said of Reid and McConnell. "All pointing in the right direction."

McConnell spokesman Don Stewart added in a statement: "Given tonight's events, the Leaders have decided to work toward a solution that would reopen the government and prevent default. They are optimistic an agreement can be reached."

In addition to lifting the $16.7 trillion debt limit, the emerging measure would fund the government through Jan. 15. It would also create additional safeguards to ensure that people who receive subsidies to buy health insurance under President Barack Obama's new health-care program are in fact eligible — a key Republican demand.

In the interest of striking a bipartisan deal, Democratic leadership aides said they were considering dropping a demand to delay a new tax on existing health insurance plans, a change intended to benefit organized labor. Meanwhile, Republicans said they were considering dropping a provision that would deny the Treasury Department flexibility to manage the nation's books after the Feb. 7 deadline — a non-starter with the White House.

Durbin, the Senate's No. 2 Democrat and chief vote counter, predicted that the final package would pass the Senate by a wide margin with support from both parties.

"With McConnell's name on it," he said, "we feel it will get a good, strong vote."

Its fate in the House, however, appeared uncertain. While Minority Leader Nancy Pelosi, D-Calif., has pledged the support of all 200 Democrats, it was unclear after Tuesday's debacle that Boehner could muster even the handful of Republicans necessary to push the bill to final passage.

Tuesday was just the latest disaster in Boehner's three-year tenure as speaker. Ironically, it came on a day when Republicans in the Senate — close to their own deal with Reid — decided to pause those talks to give Boehner a chance to consolidate his weakening hold on power.

If Boehner were able to rally support for a measure more palatable to Republicans, it would have strengthened McConnell's hand and smoothed the procedural path through the Senate.

Boehner "would establish himself as the leader of the House, which is good for the country," Sen. Lindsey Graham, R-S.C., told reporters as he left the Senate GOP's weekly luncheon. "This is offense for us. This is a defining moment for the speaker."

Graham, Saxby Chambliss of Georgia and other GOP senators had pleaded with Boehner late last week to cobble together something that would give Senate Republicans leverage over Reid's Democrats, but by Saturday morning they had given up and begun trying to settle the matter themselves.

By late Monday, as McConnell edged closer to a deal with Reid, Boehner met in McConnell's office with the leader and several other Senate Republicans. On Tuesday, Boehner convened a 9 a.m. meeting of his rank and file to being advancing his own debt-limit plan.

But as Boehner began searching for ways to attach items to the debt-limit bill that would represent small conservative victories, his majority quickly disintegrated into squabbling ideological factions.

Boehner's initial proposal would have funded the government through Dec. 15, raised the debt limit through Feb. 7, and offered two victories for conservatives: a delay of the tax on medical devices that helps finance the new health-care law and an end to employer health subsidies for lawmakers and members of the executive branch, who are required to join the new health-care exchanges.

Conservatives quickly complained that the bill would not cut spending, reform entitlement programs or erase a clause in the health law that requires employers to provide coverage for contraception.

By midafternoon, the House appeared to be rallying around a new plan that dropped the delay of the medical device tax. And in addition to denying employer subsidies to lawmakers and members of the executive branch, those subsidies — worth $5,000 for individuals and $10,000 for families — would be denied to their own congressional staffs as well.

As the bickering continued, senior aides to rank-and-file Republicans and key committees resorted to watching congressional reporters' Twitter feeds to learn what was in and out of the emerging bill.

By late afternoon, top GOP leaders gathered in Boehner's office on the second floor of the Capitol for an all-too-familiar routine: dragging recalcitrant lawmakers into his office and trying to build support.

One by one, those Republicans exited saying they were firmly against the bill: Rep. Steve King, R-Iowa, Rep. Ted Yoho, R-Fla., and Rep. Thomas Massie, R-Ky.

"I've got one vote and I'm a no," Massie told waiting reporters. Only King left open the possibility that he could vote with Boehner if more changes were made.

Mainstream conservatives were also unhappy that, after supporting a 15-day government shutdown, they would get nothing — not even the minor concessions McConnell had been discussing with Reid.

The final blow came shortly after 5 p.m., when Heritage Action for America, the powerful conservative group that drove Republicans to attack Obama's health-care initiative, sent an e-mail urging lawmakers to vote no because the House bill "would do nothing to stop Obamacare's massive new entitlements from taking root."

After 6:30 p.m., the rank and file were replaced in Boehner's office by the chamber's most powerful committee chairmen and other close allies. Soon after, the vote was called off.

"There will be no action," said House Rules Committee Chairman Pete Sessions, R-Texas.

An hour later, Majority Leader Eric Cantor, R-Va., issued an alert to lawmakers telling them that the House would be in session on Wednesday.

No specific legislation was listed for consideration. As for the timing of any votes, Cantor advised: "TBD." -- The Washington Post