Hillary Rodham Clinton speaks at the Jefferson-Jackson Dinner in Des Moines on Saturday. (Daniel Acker/Bloomberg News)

For months, Hillary Rodham Clinton’s presidential campaign labored listlessly under a cloud of doubt after revelations that she had a private e-mail server during her time as secretary of state.

Then, Republicans, as they so often do, overreached on their Clinton attacks and handed the Democratic front-runner a message and momentum that she had struggled mightily to build on her own.

First, Rep. Kevin McCarthy (R-Calif.) went on Fox News and, floundering to prove his conservative bona fides to be speaker of the House, said this to Fox News host Sean Hannity: “Everybody thought that Hillary Clinton was unbeatable, right? But we put together a Benghazi special committee, a select committee. What are her numbers today? Her numbers are dropping.”

Then there was the hearing last week — more than two years in the making (Clinton last testified before Congress on Benghazi in January 2013) — that flopped mightily for Republicans. Eleven hours worth of questions left the GOP looking small and Clinton looking calm, cool and collected. Even Rep. Trey Gowdy (R-S.C.), chairman of the House Select Committee on Benghazi, admitted in the hearing’s wake, “I don’t know that [Clinton] testified that much differently today than she has the previous time she testified.”

Hillary Clinton went before the House Select Committee on Benghazi to talk about her involvement as former secretary of state. The Fix’s Chris Cillizza discusses how she did and how this will impact her moving forward. (Alice Li/The Washington Post)

For longtime Clinton watchers — and I count myself in that category — the pattern was remarkably familiar. Republicans, handed a potent issue (and the controversy over Clinton’s private e-mail server is one), try to knock the Clintons out and instead swing, miss and fall on their collective face.

Think back to the late 1990s, when, after admitting to an extramarital affair with a White House intern, Bill Clinton found himself more popular than ever — particularly among Democrats — after congressional Republicans tried to impeach him despite the public’s skepticism about whether such a punishment was warranted.

Eerie similarities echo between that moment and this one for Republicans in Congress. Unquestionably, the revelation that Clinton exclusively used a private e-mail address and server while she was the nation’s top diplomat had damaged her front-running campaign for the Democratic nomination. Her lead over Sen. Bernie Sanders (I-Vt.) had shrunk, and large majorities of the public said she was neither honest nor trustworthy.

Most important for Clinton was that establishment Democrats began to openly fret that perhaps she simply wasn’t up to the race and that someone else — such as Vice President Biden — needed to step into the breach.

Enter McCarthy and the Gowdy-led Benghazi hearing.

McCarthy’s comments provided Clinton with overwhelming proof (at least to Democrats) that the Benghazi committee was effectively political theater designed to damage her chances of winning in 2016.

The hearing itself allowed Clinton a platform that was perfectly suited to her strengths — preparation and a remarkable tirelessness — and on which she, unsurprisingly, shined. Clinton looked in control, poised and smart. The majority of her Republican interrogators looked outmatched.

Democrats noticed. The hour after the end of the committee hearing — 9 p.m. to 10 p.m. Eastern time Thursday — was the most lucrative 60 minutes of fundraising in Clinton’s campaign.

And suddenly Clinton wasn’t the boring candidate of the status quo anymore. She was the target of — wait for it — a vast right-wing conspiracy aimed at, yet again, playing politics in hopes of hurting her chances of being elected to office.

The campaign is — and this is so obvious that it is probably not worth saying — far from over. The Iowa caucuses aren’t for about 100 more days, and the general election is a year away. Lots can, and will, change.

It is also obvious that the past two weeks have been the best two weeks of Clinton’s campaign. She has gone from flagging front-runner to rejuvenated fighter — a much better look if you want to, you know, win.

Not all of the Clinton renaissance can be credited to or blamed on Republicans. Her strong performance in the first Democratic presidential debate was all her doing, and Biden’s decision not to run seems only tangentially tied to her strengthening of late.

But the Clintons have always been at their best when under fire from the other side; Hillary Clinton, in particular, is a better counter-puncher than a first-strike player.

For some reason, Republicans have never learned that lesson. Over the past month, they have pulled off a trick that Clinton never could seem to do herself: They have turned her into a sympathetic and more appealing figure for Democrats and lots of independents — whom she will need in a general election.

If she wins the White House in November 2016, Clinton should send thank-you notes to McCarthy, Gowdy and the rest of the House Republicans. They may have saved her candidacy.