The straw that broke the camel’s back for now-ousted FBI Director James Comey was the investigation he apparently wasn’t doing.

President Trump’s much-reported frustration with Comey almost certainly arose from the G-man’s failure to get to the bottom of Obama aides’ illegal leaks of classified information — leaks aimed at undermining the incoming Trump administration.

And top Republicans in Congress shared that concern.

Under grilling last week, the director refused to say whether he had launched a probe into illegal leaks by the Obama team of highly classified intelligence intercepts of Lt. Gen. Michael Flynn and possibly other private US citizens working on the Trump transition.

“I don’t want to answer that,” Comey told Senate Judicary Committee Chairman Charles Grassley. The chairman described that reticence as odd given how the government “regularly acknowledges” when it’s investigating classified leaks.

Grassley appeared skeptical the FBI had opened an investigation at all — even suggesting the bureau didn’t want to investigate itself. “There are several senior FBI officials who would’ve had access to the classified information that was leaked, including yourself and the deputy director,” the senator said, referring to Andrew McCabe, now the FBI’s acting director.

Comey’s reticence contrasts sharply with his testimony in March, when he made a show of announcing he was investigating alleged ties between the Trump campaign and the Russian government.

“I’ve been authorized to confirm that the FBI is investigating the Russian government’s efforts to interfere in the 2016 presidential election,” Comey trumpeted then, including “investigating the nature of any links between individuals associated with the Trump campaign and the Russian government.”

The double standard irked Grassley, as well as House Intelligence Committee member Rep. Trey Gowdy (R-SC). The Republicans reflected the frustration of the president, who tweeted for Comey to probe the classified leaks, arguing they’re “illegal” and pointing out that Comey himself said the leaks have been “unusually active” since Trump took power.

Anger boiled over Monday, after two ex-officials, Obama intelligence czar James Clapper and holdover Acting Attorney General Sally Yates, testified that nobody at the FBI had talked to them, four months after the leaks, even though they’d be key witnesses in any probe.

That suggests Comey either never opened an investigation or has been dragging his feet. The next day, Trump fired Comey.

A week earlier, Grassley sent Comey’s boss, Deputy Attorney General Rod Rosenstein, a letter urging him to make sure the leaks are “fully and impartially investigated.” Grassley indicated he wasn’t confident Comey or his deputy, McCabe, was up to the task.

He even listed McCabe as among the “potential suspects” in the leaks scandal. Grassley suggested McCabe is politically compromised due to his “financial and political links” to a close Hillary Clinton campaign operative. The senator added that McCabe has a “conflict of interest” investigating “what appear to be multiple politically motivated leaks of classified information related to the Russia controversy.”

On Thursday, Grassley laid to rest the idea — widespread among Democrats — that Trump’s motive for firing Comey was fear of where the FBI’s Russia probe might lead.

Grassley revealed that Comey had ID’d the “targets” of the probe in a recent closed-door session with him and ranking Democrat Sen. Dianne Feinstein — and Trump was not one of them. “The president’s letter said that Director Comey told him he was not under investigation,” Grassley said. “Sen. Feinstein and I heard nothing [from Comey’s private briefing] that contradicted the president’s statement.”

He said speculation Trump is under investigation is “unfounded.” Feinstein, a respected Democrat, didn’t disagree.

The 10-month-old Russia probe remains an investigation in search of a crime. The Obama team’s unmasking of Flynn’s identity in foreign-surveillance reports and leaking that classified information to the Washington Post is a crime in search of an investigation.

Unfortunately, justice will have to wait for Comey’s replacement to launch an aggressive inquiry to hunt down the leakers and lock them up. And he may first have to clean house to do it, starting with Comey’s deputy.

Sperry is author of “Infiltration: How Muslim Spies and Subversives Have Penetrated Washington.”