By Susan Cornwell

WASHINGTON (Reuters) - U.S. House of Representatives Democratic Leader Nancy Pelosi was re-elected to her post on Wednesday, beating back a challenger who accused Democrats of ignoring the working-class Americans who flocked to Republican Donald Trump in elections this month.

Pelosi, 76, a Californian who has been in Congress for 30 years and led the party in the House for 14 of them, defeated 43-year-old Tim Ryan, a seven-term representative from the Rust Belt region of northeastern Ohio. The vote, taken by secret ballot, was 134-63.

Ryan had brought his challenge complaining about the Democrats' track record under Pelosi's guidance, noting Democrats have only been in the majority in the House of Representatives for four of the past 18 years.

He said Wednesday that he had been "biting his tongue" until the Nov. 8 national election, when Trump won the White House with the support of many working-class Americans, and Republicans kept control of the House and Senate. Democrats gained only about a half-dozen seats in the House of Representatives, when some had thought they would make double-digit gains.

Ryan said after the vote he was satisfied his concerns had at least been heard by Democratic leaders, and there might be change. "If the message of the Democrats now is about working class people ... if that's our focus, we will right this ship," he said.

Pelosi also suggested there had been a lesson learned. "Never again will we have an election where there’s any doubt in anyone's minds where the Democrats are when it comes to America's working families," she told reporters.

It was the biggest challenge to Pelosi's leadership since 2010, when then-Representative Heath Shuler got just 43 votes.

Ryan's backers stressed they fear the party will be doomed to its minority status if it continues to move away from working-class people, traditionally part of the Democrats' base.

"We talk more about free-range chickens than we do working people on the Democratic side sometimes," Representative Stephen Lynch of Massachusetts said before the vote.

"We have to convince the American people, the American worker, that we're in their corner. And Donald Trump did that. He took that away from us," Lynch said.

But Representative Eliot Engel, a Pelosi supporter, said "you really can't blame her" for the party's disappointing showing in November. "It was a loss of support at the top and it trickled all the way down," Engel said.

(Reporting by Susan Cornwell; Editing by David Alexander and James Dalgleish)