By Thomas Ferraro and Richard Cowan

WASHINGTON (Reuters) - John Boehner says he learned how to deal with all sorts of people working as a boy in his dad's bar. That skill came in handy this week in Congress, but not all left happy.

With his willingness to bargain, the speaker of the U.S. House of Representatives won passage on Friday of the economically important payroll tax-cut extension. But he lost a hefty block of Republicans who may end up determining his political fate.

Ninety-one Republicans broke ranks with Boehner and voted against the measure. Yet 146 other House Republicans and 147 Democrats voted for it.

Boehner, leaning on his bar room pragmatism, thanked fellow Republican leaders for helping "resolve this issue in a constructive fashion."

For Republicans, no matter how they voted, the party can now get back to talking about what it wants to talk about - Obama's failure to create lots of jobs - instead of fending off charges of having questioned a tax cut for the middle-class while defending tax cuts for the rich.

But some Republicans see a longer-term problem for the 62-year-old Boehner. Given all the uprisings he has had to quell within his ranks on major bills over the past year, they question his staying power.

"I think he's got to be watching his flank," a senior House Republican said. "Whenever you pass something using Democratic votes, as a speaker, that usually spells some problems."

In years past, Republican speakers tried to pass legislation that a "majority of the majority" backed. Boehner has had no such luxury, given the fissures within his party and the unwillingness of many Tea Party activists to compromise.

Pressure on Boehner likely will intensify, the lawmaker said, if the party loses many seats in the November elections.

For now though, even some Tea Party activists who hate the idea of adding to deficits, showed flexibility and backed Boehner. Like the speaker, many of them acknowledged that this battle was threatening to hurt Republicans in the November 6 elections when control of Congress and the White House will be up for grabs.

But it will also raise by $100 billion the U.S. deficit that Republicans vowed to cut when they won control of the House in the 2010 elections with help from the anti-Washington Tea Party movement.

By providing the average American family an additional $1,000 this year, many believe that tax-cut extension will give a needed boost to the economy, which in turn, could help President Barack Obama win a second term.

"John Boehner could end up being blamed for helping Obama get re-elected," said Greg Valliere of the Potomac Research Group, a private firm that tracks Washington for investors.

"But he did what he thought was right," Valliere said. "This normally gridlocked Congress finally got something done today and I think John Boehner deserves a majority of the credit."

'ONLY GUY IN TOWN TRYING TO GET THINGS DONE'

Boehner, a former small businessman elected to Congress in 1990, made the bill possible this week when he dropped a demand that renewal of the payroll tax cut for 160 million U.S. workers be paid for with spending cuts to other federal program.

While many budget-cutting conservatives decried the move, a majority of House Republicans stood with their speaker, including 24 of 60 in the House Tea Party Caucus.

"I will vote for any measure that allow Americans to keep more of their own money," said Representative Joe Walsh, a Tea Party favorite, who voted for the bill.

"I'm among those who yell at our speaker that we need to do more to cut the deficit," Walsh said after Friday's vote. "But he's the only guy in town who's actually trying to get things done."

Republican Representative Joe Wilson, another Tea Party supporter, voted against the bill, saying: "We need to do more to cut the deficit. John Boehner will take some heat for this."

Yet Wilson offered praise for Boehner - "he is a very bright guy" - for getting the bill through Congress and a "tough issue off the table for Republicans."

People aligned with the conservative Tea Party movement have been critics of Boehner, yet it has lost favor with Americans since packing so much clout two years ago. A New York Times/CBS poll last August had found its disapproval rating at 43 percent, up from 18 percent in April 2010.

Chris Littleton, a Tea Party leader in Boehner's district in Ohio, voiced disgust about the payroll tax-cut battle.

"This whole thing is ludicrous," said Littleton. "No one in Washington is thinking long term about taxes, about Social Security, about the deficit. They are all wrong. They are little children playing with others toys."

(Reporting By Thomas Ferraro; Editing by Mary Milliken and Stacey Joyce)