WASHINGTON (AP) — Congress returns to a changed political landscape Tuesday as newly-elected lawmakers arrive in Washington, the parties elect new leadership and incumbents square off for one final legislative sprint before House Democrats take power.

Voters swept away eight years of House Republican control in last week’s election, creating a new political dynamic that’s challenging President Donald Trump even before the new 116th Congress begins in January.

For their last act, Republicans will try to deliver on Trump’s promise to fund the border wall, which could spark a partial federal government shutdown in weeks. Newly emboldened Democrats are in no mood to cooperate over wall money. Instead, they’ll be pushing to protect special counsel Robert Mueller’s probe from acting Attorney General Matt Whitaker, who has criticized the investigation into Russian interference in the 2016 election. All sides must agree to a federal funding bill to prevent a partial government shutdown from beginning on Dec. 7.

“House Democrats are anything but lame ducks,” Democratic Leader Nancy Pelosi wrote Monday to colleagues, saying Democrats are “flying high and taking pride” in the greatest Democratic sweep of the House since the Watergate election of 1974. They picked up at least 32 seats, with several races still undecided.

“We have great opportunity, and therefore great responsibility to get results for the American people,” Pelosi wrote. Democrats “need to be unified, find common ground with Republicans in our legislative engagements, but stand our ground when we must.”

Against this backdrop, dozens of new House lawmakers and a handful of new senators arrived for a whirlwind orientation session. They will take their official photos, meet colleagues and take what could prove to be the toughest vote of their early careers — electing their leadership. Several new Congressional Progressive Caucus members held their first press conference Monday.

“I hope that we are ushering in a new era,” said Rep.-elect Ayanna Pressley, D-Mass.

Their majority lost, House Republicans will start the task of rebuilding. Retiring Speaker Paul Ryan will begin to transition out of power and next-in-line Kevin McCarthy of California is favored over conservative Rep. Jim Jordan, a leader of the Freedom Caucus, to win the job of incoming minority leader in leadership elections Wednesday. GOP Whip Steve Scalise of Louisiana is expected keep his spot unchallenged. And new to leadership will be Rep. Liz Cheney, the daughter of former Vice President Dick Cheney, in the No. 3 position of conference chair.

“We’ve got to change the way that we operate and really in some ways be more aggressive,” Cheney, running unopposed, told The Associated Press.

Senators will also select their leaders, but few surprises are expected. On the Democratic side, Sen. Chuck Schumer of New York is set to return as leader, even though the party lost several seats in the election.

Schumer suggested Democrats would use the lame duck session to fight to protect special counsel. “People are really concerned about this,” Schumer told CNN.

Senate Majority Leader Mitch McConnell has predicted a “lively” lame duck session. He has said legislation to protect Mueller is “unnecessary” because the investigation is “not under threat.”

McConnell is poised to again lead Republicans, but term limits are pushing GOP Whip John Cornyn of Texas out of the No. 2 spot, making way for South Dakota Sen. John Thune to move up. Wyoming Sen. John Barrasso and Sen. Roy Blunt of Missouri will round out the team, and Cornyn will still have a seat at McConnell’s table of counselors.

McConnell is also trying to add a female senator to a lower leadership spot, seeking to address the optics of having an all-male leadership slate in a year that brought a record number of women to Congress.

The biggest leadership race is Pelosi’s bid to return as the first female House speaker, a contest she says she’s “100 percent” confident she will win despite a public campaign by some incumbent and newly elected Democrats to oust her. Preliminary voting won’t unfold for House Democrats until after Thanksgiving.

Amid the leadership shuffle, lawmakers have several pieces of legislation they want to finish by year’s end, including a farm policy bill and legislation overhauling Congress’ handling of sexual harassment claims. The Senate will try to confirm more of Trump’s judicial and administrative nominees, including a vote this week on Michelle Bowman to be a member of the Federal Reserve’s board of governors.

But first they appeared headed toward a showdown over Trump’s wall along the U.S.-Mexico border.

Trump spent weeks ahead of the midterm election rallying fears over a migrant caravan heading toward the border and promised voters that Republicans would bring tougher border security.

House Republicans have already approved $5 billion for Trump’s wall, but in the Senate, where Republicans need Democratic support to prevent a filibuster, a bipartisan bill allocates $1.6 billion.

McCarthy upped the stakes by introducing legislation for the full $25 billion the White House wants in border funds as he tries to shore up support from conservatives ahead of the GOP leadership election.

It’s unclear how hard Republicans will be willing to fight for the wall, given that dozens of House GOP lawmakers are serving their final days in Congress after retiring or losing their re-election races. Ryan had promised a “big fight” over the border money and McConnell said a mini-shutdown may be necessary to help Trump “get what he’s looking for” on the wall.

Rep. Nita Lowey of New York, who is set to chair the House Appropriations Committee, said Democrats “have our boxing gloves on” to spar with Trump and other Republicans.

The top Democrat on the Senate Appropriations panel, Sen. Patrick Leahy of Vermont, on Monday told reporters Trump is the only person in Washington who seems to want to a shutdown.

Firefighters battling California wildfires, police officers and other emergency responders all would be hurt by a shutdown, he said. If Republicans insist that “it’s the wall or nothing, then they are going to get nothing,” Leahy said.

___

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