These victories led Thomas Mann, who studies Congress at the Brookings Institution, to call Pelosi the “strongest and most effective speaker of modern times.” And even after being relegated to minority leader when Republicans took the House in 2010, she kept winning legislative fights. In the summer of 2015, the American Israel Public Affairs Committee and the Republican Party launched a mammoth lobbying campaign to kill Obama’s nuclear agreement with Iran. Pelosi quickly secured the votes to prevent Republicans from overturning the agreement, thus checkmating the deal’s foes.

In addition to being a masterful legislative tactician, the 77-year-old Pelosi is, in Politico’s words, “the most successful nonpresidential political fundraiser in U.S. history.” Yet many of her colleagues want her gone. In November 2016, almost a third of House Democrats voted to depose her as leader. Another coup attempt erupted last summer. Why so much discontent with a woman who has proved so good at her job? Maybe because many Democrats think Pelosi’s unpopularity undermines their chances of winning back the House. Why is she so unpopular? Because powerful women politicians usually are. Therein lies the tragedy. Nancy Pelosi does her job about as well as anyone could. But because she’s a woman, she may not be doing it well enough.

Within days of Pelosi’s ascension to House minority leader, in 2003, back when nearly 60 percent of Americans still had no idea who she was, the Republican Party featured her visage—“garish and twisted,” in the words of a magazine article at the time—in an ad against a Democrat running for Congress in Louisiana. The GOP has been using her as a scarecrow ever since. Before the 2010 midterms, the National Republican Congressional Committee cited Pelosi in an astonishing 70 percent of its ads—far more than the percentage that cited Obama. And for good reason: Internal Republican polling showed that Pelosi was far less popular than the president. After Democrats lost their House majority that fall, Congressman Allen Boyd of Florida, whose reelection bid failed, called hers “the face that defeated us in this last election.”

In the run-up to the 2012 elections, according to the Wesleyan Media Project, Republicans invoked Pelosi in television ads seven times as often as they invoked the Senate’s Democratic leader, Harry Reid. Four years after that, in the run-up to 2016, they invoked her three times as often.

In the Trump era, as Republican vulnerability has mounted, the GOP has targeted Pelosi yet again. Last summer, when the Democrat Jon Ossoff showed surprising strength in a special election for a House seat in Georgia, Republicans responded with millions of dollars in ads tying him to Pelosi. “Say No to Pelosi’s Yes Man,” a GOP commercial instructed. One piece of Republican mail depicted a laughing Pelosi maneuvering Ossoff like a marionette alongside the words “Now She’s in Control.” Another featured Pelosi ripping off an Ossoff mask. When the journalist Michael Tracey traveled through Montana before it held a special House election last May, he was, he wrote on CNBC’s website, “struck by the frequency with which folks cited aversion to Pelosi as the reason why they’d backed the Republican.”