Updated

House Democrats have voted for Nancy Pelosi to stand as their candidate for speaker.

The Democrats met virtually Wednesday to select their top leaders for the 117th Congress. Democrats are expected to maintain a slim majority in the new Congress – the most-narrow in two decades for either party.

The votes were taken by secret ballot, thanks to a secure app Democrats used Wednesday. Pelosi, D-Calif., ran unopposed.

KEVIN MCCARTHY IS REELECTED AS TOP HOUSE REPUBLICAN

The full House of Representatives elects the speaker when it convenes on Jan, 3. The winning candidate for speaker requires an outright majority of the entire House. In other words, 218 votes out of 435.

In January, Democrats will run Pelosi for speaker. The GOP will run House Minority Leader Kevin McCarthy, R-Calif.

CLICK HERE FOR THE FOX NEWS APP

Typically, the nominee of the majority party wins. But Pelosi had to hustle to get the votes to become speaker two years ago and there is a math question that looms in January.

Fifteen House Democrats voted against Pelosi on the floor two years ago. But because the Democrats’ majority was so large, Pelosi had a substantial cushion. She lacks that this time. Pelosi’s margin for victory is thin. She can only afford to lose a few Democrats on the floor during the vote for speaker.

On Wednesday, House Majority Leader Steny Hoyer, D-Md., and No. 3 party leader Jim Clyburn, D-S.C., Congress’ highest ranking Black member, were reelected to their positions, like Pelosi without opposition. Clyburn revived Biden's faltering bid for the Democratic presidential nomination this year by helping him win the South Carolina primary, a turnaround moment in Biden's campaign.

“The theme, I think, of what we do next has to be about justice" in the economy, health care and policing, Pelosi told her colleagues after the vote, according to a transcript released by her office. She also asked them to listen respectfully to voters and each other, adding, “Joe Biden is a unifier, so that will make it easier for us."

But with some votes still being tallied in this month's elections, 10 incumbent House Democrats have been defeated, dashing expectations of adding seats and damaging party morale. Democrats were on track to have perhaps a 222-213 majority, one of the smallest in decades.

This has sparked finger-pointing, with progressives saying the party failed to adequately win over minority and young liberal voters. Moderates say that they were hurt by far-left initiatives like defunding the police and that Pelosi should have struck a preelection stimulus deal with the White House.

Besides bitterness over their election setback, many Democrats continue calling for fresh leadership. Pelosi and Hoyer have been No. 1 and 2 House Democrats since 2003, while Clyburn rose to the No. 3 ranks in 2007. Pelosi and Clyburn are 80, Hoyer is 81.

Pelosi's reelection by the House would give her a seventh and eight year as speaker. She served the first four during the 2000s until Republicans recaptured the House majority in the tea party election of 2010, a conservative uprising that presaged the rise of Trump.

The Associated Press contributed to this report.