In one deft performance the top Democrat in the House owned the president, having faced down Republicans’ scare tactics and attacks from her own side

Nancy Pelosi was perched on the end of a sofa in the Oval Office when the balance of power in Donald Trump’s Washington decisively shifted in her favour.

The event in early December began as a simple photo call with Trump – the first attempt at bipartisan dialogue after the midterm elections saw Democrats take back control of the House of Representatives.

The president was in domineering form, making demands about funding for his stalled border wall and contemplating shutting down the government if a budget was not passed giving him $5bn for his unfulfilled promise.

“I think the American people recognise that we must keep government open, that a shutdown is not worth anything,” said Pelosi as Trump nodded. “And that we should not have a Trump shutdown.”

The president looked up and said: “A what? Did you say a Trump – ?”

After two years surrounded by loyalists and sycophants, Trump had got his first taste of what life will be like with Pelosi in control of one half of Congress. And as the cameras rolled, he quickly lost his cool, declaring he would be “proud to shut down the government”, trapped on live TV by his temper and the pincer movement of Pelosi and the top Democratic senator Chuck Schumer.

Play Video 2:52 Trump in extraordinary clash with Pelosi and Schumer – video highlights

Pelosi walked out of the White House into brilliant sunshine in sunglasses and a fiery red coat looking triumphant and returned to Capitol Hill to make jokes about Trump’s manhood and utter the memorable description: “It goes to show you: you get into a tinkle contest with a skunk, you get tinkle all over you.”

Pinocchio and the two Democrats: how that Trump meeting descended into farce Read more

The confrontation showed that Pelosi can outwit Trump. It also marked a turning point for her after an election season when some Democrats disowned her, apparently seeing her as a liability in races where Republicans spent millions of dollars trying to turn her into a hate figure to galvanise their voters.

According to the Wall Street Journal, there were more than 135,000 adverts during the midterms attacking Pelosi by name, and some Democratic candidates ran for election vowing not to vote for her as speaker if they won.

Wendy Schiller, chair of political science at Brown University, called the attack ad strategy “wasted money, pure and simple”. Republicans “mistakenly believed that voter animosity towards strong women was interchangeable, so they tried to get the voters who disliked Hillary Clinton to see Nancy Pelosi the same way and then transfer that dislike to their local Democratic congressional candidate.

“That is just way too many connections for most voters to make, and it infuriated a lot of women. It is as if the GOP did not live in the same #MeToo moment as the rest of us.”

Facebook Twitter Pinterest Nancy Pelosi and Chuck Schumer walk out of the West Wing after their meeting with Donald Trump on 11 December. Photograph: Andrew Harnik/AP

Pelosi raised $135m for the Democratic campaign, yet when she got back to Washington celebrating a heavy victory, some in her own party said it was time to move on from her leadership.

No challenger emerged, yet a “Never Nancy” letter gained rebellious signatures and put her hopes of getting back the gavel as speaker of the House under threat.

The moment where she owned Trump in the Oval Office put a stop to all of that as she proved she could put him under pressure – and with the 2020 election in mind, hope to deliver him in a weakened state for whoever emerges as the Democratic presidential nominee.

To secure support for her speaker bid she agreed to serve no more than four years, but it was not much of a concession, given she would be 82 and presumably ready – at last – to retire.

'Don't fire the coach': bid to end Nancy Pelosi's reign leaves Democrats divided Read more

So, on Thursday the 78-year-old will become the face of Democratic opposition to Trump in Congress.

Almost 12 years to the day since she made history as the first female speaker, Pelosi will be back, calling the plays against Trump and passing bills on Democratic priorities from gun control to reform of voter suppression laws.

Of course, those bills will be unlikely to get through the Republican-held Senate, but the strategy will help Democrats define Trump and the Republicans.

Cindy Simon Rosenthal, author of Speaker Nancy Pelosi and the New American Politics, published in 2007 when the California congresswoman first took the House gavel, said: “It may not result in legislation making it all the way through, but Democrats would go into the 2020 election cycle with strong campaign issues where they would portray the Republicans as the party of gerrymandering, voter suppression and unbridled campaign ethics violations, a narrative that will be useful to Democrats.”

Pelosi will probably disappoint people hoping to see impeachment proceedings against Trump. Instead she will place the emphasis on investigations by Democratic-led committees in the House to keep the Trump administration in the crosshairs.

Policy issues including family separation at the border, the rolling back of environmental protections, and the president’s handling of the aftermath of deadly hurricanes will be examined, alongside the many scandals surrounding Trump’s business conflicts, Russian election interference and the president’s possible obstruction of justice.

Rosenthal added: “She will have enough issues that are common cause with progressives to keep them together.”

Do the new generation of progressive Democrats have a point? Is she too much of a pragmatist to lead their radical agenda – and too much of an easy target for Republican rage?

It is true she is a machine politician – brought up in the deal-making politics of Baltimore where her Italian-American father was in office throughout the 1940s and 50s as congressman and then mayor.

Facebook Twitter Pinterest Nancy Pelosi was brought up in the deal-making politics of Baltimore. Photograph: J Scott Applewhite/AP

But her deal-making and strategy delivered the votes for Barack Obama’s Affordable Healthcare Act in 2010 when the White House was wavering and preparing to water down the reforms.

She is not a great public speaker and often misspeaks, memorably triggering accusations of a lack of transparency over Obamacare by saying: “We have to pass the bill so you can find out what’s in it.”

Perhaps she stands somewhere in the middle of the two cartoonish characterisations: on one side, the progressive left ready to dismiss her as a symbol of the status quo; on the other, Republicans who have branded her an extremist liberal radical feminist.

Charlie Cook, editor of the Cook Political Report, said she was the best and pragmatic choice for Democrats. “In hindsight, keeping Pelosi seems pretty obvious, but while the desire for someone new and younger was great, someone with less political skill than her would not have survived this challenge.”

What is in store for Trump? “She is as tough as he thinks he is,” Cook said. “He could not have a more tenacious adversary, the combination of Pelosi and Schumer is hard to beat. They have seen it all and are both shrewd as hell.”

Their White House meeting with Trump was “an omen of things to come”, Rosenthal said.

“There was a lot in that episode that is very familiar to women in the corporate world, women in politics – where they get talked over, minimised, and men underestimate them and frankly treat them not as equals. What she demonstrated is that she is a woman who knows all those tricks and is not gonna be defeated … you know, the president is gonna have his hands full.”

• This article was amended on 31 December 2018 to clarify that Pelosi said tinkle contest, not tickle contest.