WASHINGTON (AP) — Vilified by Republicans on the campaign trail, Nancy Pelosi emerged as President Donald Trump's preferred choice to become speaker of the House, arriving on Capitol Hill with an air of inevitability after leading her party back to the majority.

The Democratic leader is positioned to return to the speaker's office after Democrats took back the House in Tuesday's midterm elections. Already the only woman to have held the job, she would also become one of the few lawmakers to reclaim the gavel after losing it.

Pelosi is a "smart woman," Trump said Wednesday during a nearly 90-minute news conference at the White House, and someone with whom he hopes to engage in "beautiful bipartisanship" and deal-making. It was a role reversal from just days ago, when he warned voters of her "radical" agenda.

She "deserved" to become speaker again after winning the House, Trump said Wednesday, adding that he looked forward to doing "a tremendous amount of legislation" once power in Congress is divided between a Democratic House and Republican Senate.

At the Capitol, in the stately Rayburn Room — named after the last speaker who returned to the office — Pelosi was asked if she was confident she would become speaker when the new Congress convenes in January. She said simply: "Yes, I am."

Yet ascent of the California Democrat is nowhere near guaranteed. Many younger House Democrats, including some of the newly elected, have pledged to vote against her. They are reluctant to shout the name "Pelosi" when the cameras zoom in during the first roll call of Congress, fearful of the attack ads that will be launched against them.

As Trump and Pelosi extended overtures across Pennsylvania Avenue, they also shadowboxed around the new dynamic created by the House's ability to probe the president's business dealings and his administration. The president warned Democrats not to push too hard with their investigations, or he would smack back even harder; Pelosi vowed that they would conduct responsible oversight.

The two have reasons to cooperate. Both want to score legislative wins to bring to voters ahead of the 2020 election. They talked on election night about doing an infrastructure package and lowering health care costs, particularly around prescription drugs, priorities for both sides.

"There's plenty of opportunity," Pelosi said, noting she worked productively with President George W. Bush during her last turn as speaker. She also referenced Democratic Rep. Maxine Waters of California, another favorite Trump villain, who is set to lead the powerful Financial Services Committee.

"Democrats come to this majority with the responsibility not to Democrats — it's not to Democrats or Republicans — it's to the United States of America," she said. "The fact is we'd like to work together."

Pelosi is likely to win first-round voting later this month to become leader, when she needs half of House Democrats to support her. But becoming speaker requires a majority of the full House, 218 votes, and her slim majority — now at 222 — leaves her little cushion.

It's not just her. Pelosi heads a trio of septuagenarian leaders, with Democratic Whip Steny Hoyer and Assistant Leader Jim Clyburn, who have held power since the last time Democrats took back the House majority, in 2006. Each is poised to move up a slot.

Democrats who want new leadership have been whispering about it for weeks, and on Wednesday, several Pelosi opponents announced their intent to run for the top posts.

"I've been saying for a long time that the Democratic Party leadership is in dire need of change," wrote Rep. Filemon Vela of Texas, one of two who wants to run for the No. 3 job of chief vote-counter. "Ya es tiempo de un cambio!" he echoed his statement in Spanish.

Another Democrat, Rep. Diana DeGette of Colorado, also jumped into the whip's race.

Both candidacies are a direct affront to Clyburn, the highest-ranking African-American in Congress, who is in line to become the whip. He announced his bid Wednesday, pledging to "make America's greatness apply fairly and equitably to all Americans."

Three others announced their runs for assistant leader, the new No. 4 post, including Rep. Ben Ray Lujan of New Mexico, the chairman of the campaign committee who helped lead his colleagues to the majority.

So far, though, no one has mounted a serious direct challenge to Pelosi, and some are reluctant to take on the first female speaker after an election that brought a record number of women to the polls and to the House.

"'Thank you for returning us to the majority. Now we want to say goodbye'? That's very difficult," said Rep. Gerry Connolly, D-Va. "But the math is very difficult for her, and it's inescapable."

Ohio Rep. Tim Ryan, who ran against Pelosi last year as a centrist alternative, said colleagues want to do what's best for the new members coming from districts that just flipped from Republicans. He said those Democrats need to be able to run for re-election in two years without being saddled with the GOP's attacks on Pelosi.

"The one thing that keeps emerging in the conversation is, What do we have to do to protect our new members?" Ryan said. "What are we doing to protect the majority makers?"

Fallout on the Republican side of the aisle is just as complicated, with Majority Leader Kevin McCarthy of California facing a challenge from conservative Rep. Jim Jordan of Ohio for the top spot in their shrunken ranks. Both said they will seek the job of minority leader.

Republican leadership elections are set for next week.

For Pelosi, Trump's endorsement Wednesday could be just what she needs to push past the naysayers and help neutralize the critics. He said he would be happy to help "supply her the necessary votes."

Pelosi appreciated the gesture but said she doesn't "deserve" to be speaker based on what she's done. "It's what you can do." She often says her fashion choices make a political statement, and her pink dress on Wednesday spoke volumes. She said, "I'm the best person to go forward to unify, to negotiate."

House Minority Leader Nancy Pelosi, D-Calif., speaks in during a news conference on Capitol Hill in Washington, Wednesday, Nov. 7, 2018. Pelosi says she's confident she will win enough support to be elected speaker of the House next year and that she is the best person for the job. (AP Photo/J. Scott Applewhite)

House Minority Leader Nancy Pelosi, D-Calif., speaks at a news conference on Capitol Hill in Washington, Wednesday, Nov. 7, 2018. Pelosi says she's confident she will win enough support to be elected speaker of the House next year and that she is the best person for the job. (AP Photo/J. Scott Applewhite)

House Minority Leader Nancy Pelosi, D-Calif., speaks at a news conference on Capitol Hill in Washington, Wednesday, Nov. 7, 2018. Pelosi says she's confident she will win enough support to be elected speaker of the House next year and that she is the best person for the job. (AP Photo/J. Scott Applewhite)

ATLANTA (AP) — Stacey Abrams broke the rules of politics until the very end.The Georgia Democrat who came about 60,000 votes shy of becoming America's first black female governor refused to follow the traditional script for defeated politicians who offer gracious congratulations to their victorious competitor and gently exit the stage.

NEW YORK (AP) — Even before they announce their White House intentions, New Hampshire's ambitious neighbors are in the midst of a shadow campaign to shape the nation's first presidential primary election of the 2020 season.

TALLAHASSEE, Fla. (AP) — Democratic Sen. Bill Nelson, a Florida political icon whose career highlight may have been a trip on the space shuttle, conceded his bitterly close re-election bid to Republican Rick Scott on Sunday, ceding a razor-thin race to the outgoing governor after a tense and sometimes turbulent recount.

TALLAHASSEE, Fla. (AP) — Andrew Gillum, who tried to energize Florida's young and minority voters through a Democratic coalition seeking to end two decades of Republican control of the governor's office, ended his hard-fought campaign Saturday as the state's first black nominee for the post.

TALLAHASSEE, Fla. (AP) — Andrew Gillum, who tried to energize Florida's young and minority voters through a Democratic coalition seeking to end two decades of Republican control of the governor's office, ended his hard-fought campaign Saturday as the state's first black nominee for the post.