That disenchantment manifested itself in 63 lawmakers supporting Pelosi's opponent, Ohio Rep. Tim Ryan, in the secret-ballot vote. That was by far the largest defection Pelosi has suffered since she began leading House Democrats in 2002.
Still, the California lawmaker had declared ahead of time that more than two-thirds of the caucus was supporting her, and she won almost exactly two-thirds with 134 votes.
It was a testament to her vote-counting skills and to her ability to hang onto power even in dark days for Democrats, as they confront a capital that will be fully controlled by the GOP next year.
Republicans are on track to hold at least 240 seats in the House next year, while Democrats will have 194.
More From This Section
Pelosi herself, appearing elated after her victory, pledged that Democrats have won elections before and would do so again, even though they've been in the minority in the House since 2010.
"I have a special spring in my step today because this opportunity is a special one, to lead the House Democrats, bring everyone together as we go forward," Pelosi said. Of Trump, she said: "Where we can engage, we will. Where we need to oppose, we will."
For their part, Ryan and his backers insisted after the vote that they had won a victory in sending a message to Pelosi about the significant desire for change among House Democrats.
"Somebody had to do something," said Ryan, a seven-term lawmaker who before now had been largely a back-bencher. "Our prospects have improved just because of this conversation."
Yet Democrats' marginalized status was evident as Ryan struggled to answer a question about who would lead the party forward, before concluding: "We're all going to participate in leading the party.