WASHINGTON (Reuters) - Now that the Democrats have won control of the U.S. House of Representatives, they need to choose a leader and that means solving one of their toughest puzzles: Nancy Pelosi.

A contest among the Democrats for the House’s top job of speaker will play out over the next 10 weeks or so, with the formidable 78-year-old San Francisco liberal at the center.

Pelosi, who has led the House Democrats in the minority or majority since 2003, told reporters on Wednesday she was confident she would be speaker of the House again. She has some critics who say it is time for generational change, but no challenger has emerged, and two senior Democrats said on Wednesday they would seek other leadership jobs.

“I think I’m the best person to go forward, to unify, to negotiate,” she said.

Pelosi made history from 2007 to 2011 as the first woman speaker, a powerful position second in the line of emergency presidential succession after the vice president.

An unexpected intervention in the speaker’s race came on Wednesday from Republican President Donald Trump, who tweeted that Pelosi deserved the job, even though he frequently assails her and other Democrats as obstructions to his agenda.

“In all fairness, Nancy Pelosi deserves to be chosen Speaker of the House by the Democrats,” he said on Twitter. “If they give her a hard time, perhaps we will add some Republican votes. She has earned this great honor!”

Trump’s intent with the tweet was unclear but he also telephoned Pelosi on Tuesday evening to congratulate her on the Democrats’ win. Pelosi, acknowledging the tweet, told reporters: “I don’t think anybody deserves anything. It’s not about what you have done, it’s what you can do.”

Trump adviser Kellyanne Conway said Trump told Pelosi he was willing to make a deal on young illegal immigrants known as Dreamers and work on infrastructure spending, but he also wants to build a wall on the southern border with Mexico.

DISSATISFACTION

During the congressional campaigns that just ended, dozens of Democratic House candidates called for new leadership, registering indirect dissatisfaction with Pelosi, who has become a punching bag for Republicans. But not all the Democrats urging new leadership won election to the House.

With some races still undecided, Democrats were headed for a gain of about 30 seats, beyond the 23 they needed to claim their first majority in the 435-member House in eight years. Their first order of business as the House majority will be to decide whether to put the speaker’s gavel back in Pelosi’s hands.

At a victory celebration in Washington on Tuesday, Pelosi said a Democratic House “will work for solutions that bring us together because we have all had enough of division.”

Slideshow ( 5 images )

She was flanked by No. 2 House Democrat Steny Hoyer and No. 3 House Democrat James Clyburn in a sign that the three - all in their late 70s - could aim to lead the chamber in the new Congress that convenes in early January.

Hoyer, who is from Maryland, plans to run for majority leader, a spokeswoman said on Wednesday, which would keep him in the No. 2 position. South Carolina’s Clyburn, who previously said he would not challenge Pelosi but would consider running for speaker if Pelosi could not find the votes, said on Wednesday he would run for House majority whip. He has competition for that job: Representative Diana DeGette, 61, of Colorado.

Pelosi’s path back to the top job is clear.

Slideshow ( 5 images )

First, she must capture a majority of Democrats in a closed-doors Nov. 28 party leadership election.

Two years ago, in the internal party race for minority leader, 63 Democrats voted for Representative Tim Ryan of Ohio, but Pelosi received 134 votes.

Ryan has not ruled out running for a leadership post again, but he is discussing the situation with new House Democrats who were elected on Tuesday, a spokesman said. Some of those, like Abigail Spanberger of Virginia and Elissa Slotkin of Michigan, have said they would not vote for Pelosi for speaker.

Some Democrats already in the House, like Representative Seth Moulton of Massachusetts, also oppose Pelosi, saying she has not encouraged a younger generation of Democrats to move into leadership positions. “We need someone who builds a bench rather than clears it,” Moulton said in an interview with the Wall Street Journal.

Pelosi touched on those concerns at the news conference, saying: “I have always advanced members into leadership. They have to decide they want to run.”

If Pelosi prevails at the party level, she would become the Democrats’ candidate for speaker in a public roll call vote in early January by all 435 House members from both parties.

A handful of more junior lawmakers are in leadership races too. New Mexico’s Ben Ray Lujan, 46, current chairman of the Democratic Congressional Campaign Committee, announced Wednesday his bid for assistant Democratic leader, the 4th-ranking position, joining two other Democrats already in the contest: Cheri Bustos of Illinois and David Cicilline of Rhode Island.