Democrats, led by Senator Harry Reid, the majority leader, reacted angrily to the turn of events in the House.

“When we met last week, Speaker Boehner requested that Senator McConnell and I work out a compromise,” Mr. Reid said, referring to the minority leader, Senator Mitch McConnell of Kentucky. “Neither side got everything they wanted, but we forged a middle ground that passed the Senate by an overwhelming bipartisan majority.”

Although Mr. McConnell, like scores of his colleagues, voted for the Senate-brokered bill, he retreated from the measure on Sunday, throwing his support behind Mr. Boehner’s idea to come up with a yearlong extension, which was the original goal of Mr. Obama and Senate Democrats.

“The House and the president both want a full-year extension,” Don Stewart, a spokesman for Mr. McConnell, said in an e-mail to reporters. “The best way to resolve the difference between the two-month extension and the full-year bill, and provide certainty for job creators, employees and the long-term unemployed, is through regular order, as the speaker suggested.”

The once-seemingly sure deal, which allowed the Senate to recess for the year, was for a $33 billion package of bills to keep the Social Security tax paid by most workers at 4.2 percent rather than 6.2 percent, extend unemployment benefits for those already receiving them, and avoid reductions in Medicare payments to doctors. The measure would be effective through February.

But the deal slid off the rails abruptly on Saturday, just hours after the Senate vote, when House Republicans balked after being briefed about the terms by their leaders. Even a sweetener provision to speed the decision process for construction of an oil pipeline from Canada to the Gulf Coast could not mollify them. Mr. Boehner had called the provision a “victory.”

So in a matter of hours, a hastily written agreement between Senate leaders — one Mr. McConnell said Saturday on the Senate floor was “not designed to fail but designed to pass” — gave way to chaos..