Pelosi, the nation's first female House speaker, will become minority leader when Republicans assume the majority in the new Congress in January.
She defeated moderate Democratic Rep. Heath Shuler of North Carolina, 150-43, in secret balloting in a lengthy closed-door gathering of House Democrats in the Capitol.
Pelosi, 70, overcame a rebellion from party centrists, and even some fellow liberals, who argued that the party needs to offer a new face of leadership after losing at least 60 House seats on Nov. 2. She remains popular among the liberals who dominate the party's House caucus. But Shuler's level of support - plus an earlier 129-68 vote against postponing the election that Pelosi wanted to wrap up quickly - underscored the degree of discontent in a party that Pelosi had largely bent to her will in the past four years.
Republicans voted to keep John Boehner of Ohio as their top House leader. Boehner, who celebrated his 61st birthday Wednesday, had no opposition, and will become speaker in the new Congress. Rep. Eric Cantor, R-Va., will become majority leader.
Many House Democrats defended Pelosi, who said the bad economy and high unemployment were the reasons for her party's election losses.
But others said Republicans had found too much success in running ads all over the country attacking Pelosi and linking her to other Democrats.
"The truth is, she is the face that defeated us in this last election," said Rep. Allen Boyd, D-Fla., who lost his re-election bid this month.
Rep. Tim Ryan, D-Ohio, had wanted to give party members more time to mull the election's meaning and its impact on leadership decisions.
"We've got to get our message right," Ryan said. "After a loss this substantial, there's a lot of people that just think we need to take our time and reflect about the direction we're going in, what issues we're going to focus on, what could we have done better ... It's important that the next step that we take is very well thought out."
Rep. Steny Hoyer of Maryland, a leader of moderate Democrats, kept the party's No. 2 House post. Rep. Jim Clyburn, D-S.C., the House's highest-ranking black member, was elected to keep the party's No. 3 post, renamed "assistant leader."
President Barack Obama has invited congressional leaders of both parties to the White House, a postelection session expected this week but now put off until Nov. 30. The White House said Tuesday that Boehner and Senate Minority Leader Mitch McConnell asked for the delay because of scheduling conflicts in organizing their caucuses.
The week's events offered scant evidence that Democrats, who often quarrel among themselves, will become more cohesive in the wake of their 60-seat House loss.
Shuler, for instance, showed no interest in mimicking the solidarity that House Republicans displayed during the past four years, when they voted unanimously or nearly unanimously against many high-profile initiatives by Democrats, including Obama.
"It's very frustrating when I see everyone voting in bloc," Shuler told reporters, because Americans are diverse and crave bipartisan solutions.
Republicans took a different tack after the 2006 election, which cost them the House majority they had held for 12 years. Within a day, then-Speaker Dennis Hastert, R-Ill., said he would step down as party leader in the next Congress.
House Republicans soon coalesced around Boehner, and he persuaded them to consistently oppose Democrats despite what some people saw as anti-GOP rebukes from voters in 2006 and 2008.
Associated Press writers Jim Abrams, Laurie Kellman, Julie Hirschfeld Davis and Donna Cassata contributed to this report.