WASHINGTON — Democrats won the majority. Now they just need a speaker of the House.

The standoff over Nancy Pelosi’s bid to regain the gavel intensified Friday as Democrats left Washington for the Thanksgiving holiday, an unsettling finish to an otherwise triumphant week that saw them welcome a historic class of newcomers to Capitol Hill and prepare to take control.

Pelosi was certain that she will be speaker once more, reviving her role as the first woman to wield the gavel. But her foes were equally confident they have the votes to stop her.

For now, it’s a band of disgruntled Democrats, led mostly by men, standing against the sweep of nationally-known Pelosi allies. With a test vote looming in late November, and at least one potential Pelosi challenger stepping forward, Democrats faced the grim prospect of the internal squabble over the Jan. 3 speaker’s vote dragging on for weeks, with no clear end game in sight.

“I think chaos is good if it’s productive. I think chaos is bad if it is too disruptive and it divides us too much,” said Rep. Pramila Jayapal, D-Wash., a co-chair of the Congressional Progressive Caucus, whose leaders were upbeat after meeting with Pelosi this week.

“We don’t have a lot of time,” Jayapal said. “We need to put forward the vision of who we are as a party and what we’re fighting for and so that needs to happen very, very quickly.”

Pelosi was expected to work the phones from California after meeting privately Friday with newly-elected Democrats who could be crucial to her bid for House speaker.

The freshmen entering and exiting Pelosi’s stately office off the House floor indicated they were having good meetings with the leader, though few said the talks had changed their minds to vote to support her as speaker.

Incoming Rep.-elect Abigail Spanberger of Virginia said she had a “wonderful conversation” about her district’s priorities, but “will not be voting for leader Pelosi.”

“It isn’t about her, it’s about wanting new leadership,” said Spanberger, a former CIA operative who defeated tea party Republican Rep. Dave Brat in suburban Richmond. “There isn’t anything she could say, because the decision isn’t about her.”

Another newly-elected Democrat, Rep. Jeff Van Drew of New Jersey, said he had a “pleasant” meeting, but remains a no on Pelosi as speaker. He is among 17 Democrats who have signed on to a letter opposing her. Van Drew said they discussed his districts and which committees he’d like to serve on. “I don’t feel under pressure,” he said.

In a key session, Pelosi also met for 45 minutes with Rep. Marcia Fudge, D-Ohio, a potential rival for the speakership who said the two had “a very open and frank discussion,” including about “the feeling in the caucus of people who are feeling left out and left behind.”

Fudge said she would probably decide after Thanksgiving break if she will run.

“To her credit, she wanted to know what my concerns were,” Fudge said. “What she asked me was, basically, how we could get to a point where I’m supportive.”

One question for some Democrats is what, exactly, Pelosi means when she says she intends to be a transitional leader, a bridge to a new generation. She has led the party for 15 years.

“We talked about some succession planning,” Fudge said. “I think it is something our caucus is interested in knowing.”

If it was up to most of the Democratic Party, Pelosi would win the speakership in a walk. They see her as a skilled and tested leader prepared to confront President Donald Trump and deliver on priorities.

Pelosi, 78, made history when she became the first female speaker of the House in 2007. She assumed the post after Democrats took control of the House in midterm elections during former President George W. Bush’s second term. With President Barack Obama, she was pivotal in passage of the Affordable Care Act in 2010.

She appears to be winning the outside game in her bid, amassing endorsements from a who’s who of the nation’s Democrats. Inside the Capitol she has support from influential lawmakers like Rep. John Lewis of Georgia, and backing from some of the newly-elected freshmen.

On Friday, the Brady Campaign for Gun Violence joined the list, as did Gabby Giffords, the former Arizona congresswoman who was gravely wounded during a mass shooting in her district, and who once voted against Pelosi for speaker.

“There is no one else who we would trust more,” said Kris Brown, co-president of the Brady Campaign.

The internal debate is spilling out nationally, especially on social media, where Democratic activists are publicly criticizing Rep. Seth Moulton, D-Mass., Rep. Tim Ryan, D-Ohio and others leading the campaign to oust Pelosi.

A coalition of liberal groups sounded the alarm against an overthrow being orchestrated by mostly centrist Democrats who want to prevent the San Franciscan from being the face of the party.

MoveOn.org noted her work passing the health care law and said “Dems must reject attempts to defeat her and move caucus to the right.”

It’s not lost on supporters that a group made up of mostly men is leading the effort to oust her. On the list of 17 names who’ve signed onto a letter against her, just three are women.

“We shouldn’t let a small group of white, moderate men sabotage her. We support Nancy Pelosi for Speaker of the House,” tweeted Indivisible, the group that formed after the 2016 election in opposition to Trump’s agenda and has activists nationwide.

Pelosi has fended off challenges before, but this one poses perhaps the biggest threat yet.

With a narrow Democratic majority, now at about 230 seats, she does not have much cushion to secure the 218 votes needed on the floor if all Republicans vote against her, as expected. Some House races remain undecided and the Democratic majority could grow slightly.

There is a chance the math could shift in Pelosi’s favor if lawmakers are absent or simply vote “present,” meaning she would need fewer than 218 votes for an absolute majority.

Associated Press writers Alan Fram, Matthew Daly and Mary Clare Jalonick contributed to this report.