Give Nancy Pelosi credit for survival.

After leading her party to devastating defeat in 2010 — at 71 seats, the biggest midterm election loss since 1938 — then-Speaker of the House Pelosi did not resign to let new leaders emerge.

Instead, she defeated a challenge by moderate Rep. Heath Shuler (R-NC) and tightened her grip on power. Shuler — who voted against Obamacare — won only 43 votes, and soon lost his own seat, thanks partly to redistricting by North Carolina Republicans after 2010.

Moderate Democrats had been the key to the party’s victory in 2006, which made Pelosi the first female Speaker of the House. But after 2010, Pelosi watched as moderate Democrats like Shuler were wiped out by Republicans in election after election.

She was confident that Democrats would rebound one day. In the meantime, losing suited her, because it meant that the only Democrats left in the caucus were from safe, deep-blue seats — and were completely dependent on her political patronage.

The deeply unpopular and highly partisan Pelosi has bought the support of her party by controlling campaign cash. As CNN’s Chris Cilizza observed last August: “There are nearly 26 million reasons why Nancy Pelosi isn’t going anywhere” — i.e. $26 million, Pelosi’s fundraising haul through the first half of 2017. (By year’s end, she claimed to have raised almost $50 million.)

Cilizza noted that “almost all of that haul went to the Democratic Congressional Campaign Committee, the arm of the party tasked with winning back the House in 2018.” He added: The simple fact is that without Pelosi, Democrats would be at a massive disadvantage financially. There is no one in the leadership structure under Pelosi who could step in and raise anything even close to what she is collecting for the party. … Pelosi raised roughly 40% of all of the money for the committee so far this year.”

NBC News has compiled a list of 57 Democratic candidates and incumbents who say they will not vote for Pelosi as speaker after November. But that is still less than the 63 votes Rep. Tim Ryan (D-OH) won when he challenged Pelosi’s leadership after 2016, and some of those 57 will lose.

The fact is that Pelosi will have even more leverage over newly-elected members from swing districts, most of whom have relied on her for cash. The exceptions — like Alexandria Ocasio-Cortez (NY-14) and Ayanna Pressley (MA-7), who defeated Pelosi loyalists in primary races in safe seats — are too few in number to matter.

The savviest Democrats have embraced Pelosi — tightly. Mike Levin, who is running against Republican Diane Harkey for the open seat in California’s 49th district, is a left-wing radical who will campaign later this month with “democratic socialist” Sen. Bernie Sanders (I-VT). He is far too liberal for the district — but he has won the support of the Democratic establishment by backing Pelosi to the hilt, calling her “one of my political heroes.”

In general, talk of an anti-Pelosi revolt has faded. If Democrats win, Pelosi will almost certainly become Speaker of the House again.

She will spend the next two years doing what she did in 2007-8 — containing those who want to impeach the president, while tying the White House up in pointless investigations and legislative stalemates, laying the groundwork for a Democrat to win the next presidential election.

And if Trump happens to win a second term, Pelosi would likely stick around: he motivates her to stay in Congress, she recently said.

There is only one way to send Pelosi back to San Francisco, short of deliberately losing the White House in 2020, and that is for Republicans to retain control of the House in November. Unlike 2010, when Pelosi’s closest loyalists survived the Tea Party wave, she has too few lieutenants left to protect her if her party falls short. The country would benefit if someone else — anyone — led her party.

Democrats will not replace Pelosi on their own. It is up to Republican voters to show her the door.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.