Updated

Barely beating Santa's sleigh, Congress delivered a last-minute holiday tax-cut extension to 160 million American wage-earners on Friday, just when it looked like they and millions of unemployed workers were going to be left with coal in their stockings.

It was a major yearend political victory for President Barack Obama, a big slice of humble pie for House Republicans and a blow to House Speaker John Boehner, R-Ohio, who'll have an angry band of tea party lawmakers to deal with when Congress returns to Washington next month.

Back-to-back voice vote approvals of the two-month special measure by the Senate and House came in mere seconds with no debate, just days after House Republican leaders had insisted that reopening negotiations on a full-year bill was the only way to persuade them to prevent a tax increase on Jan. 1.

Obama immediately signed the bill into law.

"I said it was critical for Congress not to go home without preventing a tax increase on 160 million working Americans and I'm pleased to say that they got it done," a buoyant looking Obama said at the White House before dashing off for his delayed holiday vacation to his home state of Hawaii.

Actually most lawmakers were long gone. A token few showed up to make approval official.

The legislation buys time for talks early next year on how to finance the year-long extensions — negotiations that promise to be contentious, especially if Democrats continue to use Obama's jobs agenda to seek a political edge in the 2012 presidential and congressional campaigns.

The measure will keep in place a 2 percentage point cut in the Social Security payroll tax — worth about $20 a week for a typical worker making $50,000 a year — and prevent almost 2 million unemployed people from losing jobless benefits averaging $300 a week. Doctors will win a reprieve from a 27 percent cut in their Medicare payments, the product of a 1997 cut that Congress has been unable to permanently fix.

Republicans did claim a major victory, winning a provision that would require Obama to make a swift decision on whether to approve construction of the Canada-to-Texas Keystone XL oil pipeline, which could generate thousands of construction jobs. To stop construction, Obama, who had wanted to put the decision off until after the 2012 election, would have to declare it was not in the nation's interest.

On Friday, an expressionless Boehner read from a piece of paper before him, gaveled the House's last session of the year closed and stepped off the podium on the Democratic side.

Boehner had been open to the Senate's version of the legislation a week ago, even though it would have punted the issue into February and given Democrats a proven political issue. But tea party forces and some in his own leadership revolted, insisting on picking a holiday fight with Democrats, and Boehner felt no choice but to go along.

The battle turned out to be a loser for House Republicans, earning the ire of swing voters and many in the GOP establishment, but when Boehner capitulated on Thursday he then felt the lash from hard-core conservatives.

"Even though there is plenty of evidence this is a bad deal for America ... the House has caved yet again to the president and Senate Democrats," said Rep. Tim Huelskamp, R-Kan.

Meanwhile, Democratic Senate leader Harry Reid of Nevada did a victory lap, twisting the knife into tea party Republicans.

"I hope this Congress has had a very good learning experience, especially those who are newer to this body," Reid said. "Everything we do around here does not have to wind up in a fight."

A full-year extension of the tax cut had been embraced by virtually every lawmaker in both the House and Senate but had been derailed in a quarrel over demands by House Republicans. Senate leaders of both parties had tried to barter their own yearlong agreement a week ago but failed, instead agreeing upon a 60-day measure to buy time for talks next year.

House GOP arguments about the legislative process and what the "uncertainty" of a two-month extension would mean for businesses seemed lame to many people when compared to the consequences of raising taxes and cutting off jobless benefits in the middle of the holiday season, and Obama and the Democrats were hard on the offensive. House Republicans finally resorted to a technical fix and the fact that Reid would name negotiators on the GOP's yearlong measure as reasons to reverse course and embrace the Senate measure.

Friday's House and Senate sessions were remarkable. Both chambers had essentially recessed for the year, but leaders in both parties orchestrated passage of the short-term agreement under debate rules that would allow any individual member of Congress to derail the pact, at least for a time. None did.

The developments were a clear win for Obama. The payroll tax cut was the centerpiece of his three-month, campaign-style drive for jobs legislation that seems to have contributed to an uptick in his poll numbers — and taken a toll on those of congressional Republicans.

The two-month version's $33 billion cost will be covered by a 0.1 percentage point increase on guarantee fees on new home loans backed by mortgage giants Fannie Mae, Freddie Mac and Ginnie Mae — at a likely cost of about $17 a month for a homeowner with a $200,000 mortgage.

The top Senate Republican, Mitch McConnell of Kentucky, was a driving force behind the final agreement, imploring Boehner to accept the deal that McConnell and Reid had struck last week and passed with overwhelming support in both parties.

Even though GOP leaders including House Majority Leader Eric Cantor, R-Va., promised that the two sides could quickly iron out their differences, the truth is that it will take intense talks to figure out both the spending cuts and fee increases required to finance the longer measure.

Republicans want to shorten the maximum length of unemployment benefits from 99 to 79 weeks, freeze the pay of federal civilian workers and make federal workers contribute more into their pensions — all ideas considered by the failed debt "supercommittee" this fall. The main provisions of the yearlong House measure cost about $200 billion, and the final version could cost more.

Reid signaled a hard line for the House-Senate talks by assigning Sen. Ben Cardin, D-Md. — a strong advocate for federal workers — to the Democratic negotiating team.