Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Republicans looked a gift horse in the mouth Thursday and put it under oath, grilling FBI Director James Comey for more than five hours on his decision to not recommend criminal prosecution for Hillary Clinton.

Experts had long predicted Clinton would escape charges over the private email server she used while serving as secretary of state. But instead of accepting Comey’s admonishment Tuesday that Clinton jeopardized national security with her “extremely careless” handling of classified information, and then declaring victory, Republicans tempted fate by publicly questioning Comey two days later.

While Republicans scored some points and created footage sure to end up in attack ads, Clinton allies walked away vindicated.

“Hillary Clinton should thank Republicans for getting her better Comey headlines today than she got on Tuesday,” tweeted former Obama speechwriter Jon Favreau.

Related: FBI Chief Grill About Decision Not to Charge Hillary Clinton

Egged on by their base, exasperated Republican lawmakers on the House Oversight Committee pressed the FBI director on his decision to not recommend prosecution. Seemingly convinced that Clinton had to be guilty of something, they implied the FBI director gave her special treatment.

"We’re mystified," said Chairman Jason Chaffetz pressed. "It seems that there are two standards, and there's no consequence for these types of activities and dealing in a careless way with classified information."

The hearing turned what had been a story about the FBI investigating Clinton into one about Republican congressmen investigating the FBI. And in a political tug of war between Congress and the FBI, Congress is easily outmatched.

Comey is an especially challenging foil. As Democrats were quick to note, Republicans — including those on the committee — have been among his most vocal champions. “I do believe that his integrity is unequaled,” Chaffetz said Tuesday. He added that he and his colleagues would “probably,” accept the director's recommendation on prosecution, “Because we do believe in James Comey.”

Related: FBI Clears Clinton on Crime While Commenting on Scandal

At a time when Americans have very little faith in federal government, the FBI is a rare exception. Nearly six-in-ten Americans say the FBI is doing a good or excellent job, and only eight percent say it’s doing a poor job.

Even Apple, the most admired brand in the world, lost a public opinion battle with the FBI when it refused the bureau's request to unlock a suspected terrorist’s iPhone. Congress is not an admired brand, with 80 percent of Americans disapproving of the legislative branch.

The hearing also risks politicizing Clinton’s emails, which should be a clear winner for the GOP, by turning them into another Benghazi-like issue — a political controversy that only hardcore partisans care much about.

In the more than two decades Clinton has spent in Washington, the same story has repeated itself over and over again: Hillary Clinton or her husband, former president Bill Clinton, push the law just short of the breaking the point, only to be bailed out by Republican overreach and self-sabotage.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

From Dan Burton, who once chaired the same committee that grilled Comey Friday, shooting a pumpkin (or melon) to make a point on Vince Foster’s death in the 1990s, to House Majority Leader Kevin McCarthy revealing that the Select Committee on Benghazi was created to damage Clinton last year, Republicans seem to walk into their own trap every time.

Last year, Republicans skewered Clinton during 11 hours of testimony before the Benghazi committee and her poll numbers went up.

While it’s too soon to tell whether Thursday’s hearing backfired, Republicans are not done prosecuting this issue. They also plan to hear testimony from Attorney General Loretta Lynch, who concurred with Comey’s decision not to prosecute Clinton.

House Speaker Paul Ryan has also formally requested the Director of National Intelligence not provide Clinton with classified information in the briefings presidential nominees typically receive, saying it would send “the wrong signal.”

Still, Clinton is not out of the woods quite yet. Republicans said they would ask the FBI to investigate whether Clinton lied under oath to Congress, since Comey’s testimony contradicted her own. And intriguingly, when asked about the Clinton Foundation, Comey said he "would not comment on existence or non-existence of any other investigations"

Republicans’ best moments during the hearing came when they used Comey’s authority to support their arguments, instead of trying to undermine him.

Related: A Painful, but Acceptable Outcome to the Clinton Email Saga

Rep. Trey Gowdy, R-SC, a former prosecutor who was chosen to lead the Benghazi committee, demonstrated his chops by leading Comey through a line of questioning that produced a ready-made attack ad, getting the FBI director to say some of Clinton’s key defenses on the email issue are “not true.”

Chaffetz, R-UT, got Comey to say that Clinton had turned over classified information to unauthorized people when she gave her emails to her lawyers. (Clinton’s campaign said their lawyers had clearance and maintain Clinton didn’t know the information was classified at the time).

They also got Comey to say that an FBI employee who did something like what Clinton did might get fired.

But most of the time, the grilling turned Comey -- a lifelong Republican who helped investigate the Whitewater Scandal -- into more of a Clinton defender than prosecutor.

Related: Who is FBI Director James Comey?

Comey said he did not believe Clinton broke the law, nor that she lied to investigators or even was evasive. He affirmed two of Clinton’s main defenses, that she set up the server for convenience and that he doesn’t believe Clinton directed her lawyers in sorting her emails. He described in detail while Clinton’s case is different from those of David Petraeus and others who have been prosecuted.

Comey tried explain that in order to bring prosecution, the Justice Department needed to prove intent, and that the evidence suggested Clinton was careless, but not malicious. Republicans blanched at this, repeatedly insisting she must have known.

“Should've known, must’ve known, has to know does not get you there. You have to prove beyond a reasonable doubt,” Comey said. “No Justice Department, whether under Democrats or Republicans, would prosecute that case.”

That left Republicans and Comey at an impasse. Rep. Buddy Carter, R-GA, said that he wasn’t a lawyer, but it seemed like any prosecutor would have a good case. Comey, a former prosecutor himself, openly disagreed.

“I'm telling you we don't," Comedy said. "And I hope people take the time to understand why."

Rep. John Mica, R-FL, said the FBI’s decision looked “fishy,” adding, “I’m not a conspiracy theorist but I have some questions about how this came down.”

Clinton’s campaign said they were pleased with the outcome. “Director Comey's testimony clearly knocked down a number of false Republican talking points and reconciled apparent contradictions between his previous remarks and Hillary Clinton's public statements,” said spokesperson Brian Fallon.

“While Republicans may try to keep this issue alive, this hearing proved those efforts will only backfire,” Fallon added.

Related: How Clinton's Email Case Compares to Prior Probes

After eight years of Obama-era partisan scandals like Fast and Furious, Solyndra, and Benghazi, Democrats have become good at beating back Republican investigations.

Ranking member Elijah Cummings, D-MD, who also did a tour of duty as the top Democrat on the Benghazi committee, has outlived one House Oversight committee’s chairman, Darrell Issa, R-CA, after he was replaced when Republican leaders lost confidence in him.

The Republican playbook is often to help politicize the investigations, so Americans see a muddied picture of partisan squabbling, rather than the facts of a case, and thus feel comfortable ignoring it.

By the time Republicans finally pulled Clinton to testify before the Benghazi Committee, 72 percent of Americans said they thought the investigation was mostly about political gain, rather than conducting an objective investigation.