It wasn’t clear whether Nancy Pelosi would be speaker when Democrats won control of the House in last November’s elections.

Considered too much of a lightning rod for Republicans, a couple dozen of the chamber’s Democrats sought to force her to give up the spot at the top of their caucus. The Democratic Party, they argued, needed “change” ― younger, fresher faces in its leadership ranks.

But now, just a couple months later, Pelosi is riding high.

Pelosi has become the chief foil of President Donald Trump in the government shutdown fight. Both Pelosi and Senate Minority Leader Chuck Schumer (D-N.Y.) refuse to give Trump the $5.7 billion he wants to build a wall along the U.S. southern border. But it’s Pelosi who has been the main antagonist.

The Californian has proven herself especially adept at getting under Trump’s skin by challenging him publicly.

In mid-December, when Pelosi and Schumer went to the White House to try to stave off a shutdown, she taunted him by referring to it as a “Trump shutdown” and essentially daring him to do it. When Trump said Pelosi was “in a situation where it’s not easy for her to talk right now,” she shot back that she didn’t need him diminishing her.

“Mr. President, please don’t characterize the strength that I bring to this meeting as the leader of the House Democrats, who just won a big victory,” she said.

She later briefed House Democrats on the meeting and characterized the wall as “a manhood thing for him,” adding, “As if manhood could ever be associated with him.”

Internet users were so happy with her performance and comments that the red coat she wore that day became a meme.

Me leaving your Holiday Party after starting major drama pic.twitter.com/BRf98b9R2g — phil (@PrettyGoodPhil) December 11, 2018

Pelosi’s approval rating has been shooting up, quieting critics who wondered whether she was the right person for the speakership.

Since the election, her favorability rating is up 8 percentage points overall, according to Civiqs, a progressive polling firm. Breaking down the numbers, she surged 14 points among Democrats, 8 points among independents and even gone up 1 point with Republicans.

In Gallup polls, Pelosi is more popular than she has been in a decade. Trump’s approval, meanwhile, is tanking.

“We’re not surprised at all that it is a smart, effective and powerful woman that is finally putting a check on Trump. Speaker Pelosi is, and has always been, a boss,” said Shaunna Thomas with UltraViolet, a women’s advocacy group.

On Wednesday, Pelosi wrote to Trump that, with no end in sight to the shutdown, it would be best if he not deliver his State of the Union address to a joint congressional session on Jan. 29, suggesting that he provide the traditional speech in writing instead. She said it was wrong to hold the event since the Secret Service is among the agencies hit by the shutdown and its agents are working without funding.

Pelosi, in other words, was taking away one of Trump’s favorite things: a big TV audience.

In response on Thursday, Trump said he was canceling a planned official foreign trip was spearheading that included a stop in Afghanistan, which required travel with military personnel. He informed her just an hour before she and other members of Congress were set to leave.

In comments to HuffPost, Rep. Tim Ryan of Ohio, who had been one of the most vocal Democrats urging Pelosi to yield the speakership to someone else, couldn’t bring himself to praise her for the job. But he also didn’t criticize her.

“I think we need to get a deal (ending the shutdown). We’ve got to get these people back to work. It’s difficult because the president’s word isn’t very reliable,” he said, adding, “I’m just shaking my head at the whole thing.”

Arthur Delaney contributed reporting.