When I half-jokingly protested that in fact Trump loved the press, Pelosi quickly replied: “May I say something you’re not going to like? I think the press loves him. All day on TV — and I don’t even watch TV, except sports. But he says somebody had a horse face — all day we hear about that. We hear about Kanye West, all day. You just give him all day! So I don’t want you to think I’m making an analogy” — the descendant of Italian immigrants then laughed, unable to resist — “but Mussolini, he didn’t care what they said about him, as long as they were talking about him.”

For months, Pelosi has been openly campaigning to be the next speaker of the House should her party gain a majority in the midterm elections, as it did on Election Day. This second speakership would make her the principal counterweight to a president she unabashedly described to me as “a very dangerous man.” It would also most likely be the final act of the 78-year-old legislator’s long career as the most powerful woman in the history of American politics. In interviews, she has audaciously declared herself to be a “master legislator”; issued policy statements on behalf of the Democratic caucus; and implicitly dared any challenger to make themselves known while also quelling opposition to her speakership by hinting in an interview with The Los Angeles Times in October that she was open to being a “transitional figure.” When I asked Pelosi about this olive branch two weeks later, however, she abruptly walked it back: “I think every leader is a transitional figure.”

Her torrid October schedule, spanning more than two dozen cities, involved meeting with candidates whose victories on Nov. 6 were mostly all but assured, while taking care to avoid hotly contested races where the presence of one of the least popular and most reliably demonized figures in American politics might cost a Democrat votes. Pelosi had spent the previous day in Arizona, rallying volunteers and donors on behalf of Ann Kirkpatrick — a candidate who, then seven points ahead of her Republican opponent in internal polls, didn’t really need Pelosi’s help. But Kirkpatrick had publicly stated that she would vote for Pelosi as speaker, and Pelosi was offering a display of gratitude. And no doubt when the time came for Kirkpatrick to ask for a plum committee assignment — the Appropriations Committee happened to be her first choice — the speaker would be only too happy to demonstrate what loyalty got you with Nancy Pelosi.

“She is, in my view, the best speaker I’ve ever seen,” said David Obey, the cantankerous former Democratic congressman from Wisconsin and chairman of the House Appropriations Committee, who served under eight different speakers, including Pelosi, over the course of his 42-year congressional career. “She understands her caucus, and she doesn’t run it like a San Francisco liberal. She runs it by trying to find its center of gravity. She works harder than anybody I’ve ever seen, and I think she has more determination to stand for something than anybody I’ve ever dealt with.”

When I asked Obey whether such skills were of any use in negotiating with a president like Trump, he acknowledged with a grunt, “Well, I think it’s damn near an impossible task for anybody to work with him. But to the extent that it’s possible, she’s the one who would have the best chance. If Trump plays that game of agreeing to something and then backing off, she has the talent to unify her caucus so that they have a unified message to take to the American people — because in cases like that, only the American people can set matters straight.”

Pelosi is something of a paradox in the world of politics. A Gallup poll five months ago found her favorability rating to be at a dismal 29 percent, and yet — unlike other unpopular political figures such as Trump and Hillary Clinton — her 31 years in public life have been free of scandal. She has been excoriated from the right as the quintessence of California limousine liberalism. But she is also a practicing Catholic whose first career was as a stay-at-home mother of five children, with little in common with — and at times little patience for — the new generation of activists in her party, to whom she sometimes refers as “the lefties.” Pelosi — who with her husband, the investor Paul Pelosi, owns a large house in San Francisco’s upper-crust Presidio Heights as well as a Napa Valley vineyard — is indeed rich. But 29 members of Congress, 18 of them Republicans, are richer.