Here’s a painful truth: Nearly 15 years after 9/11, US counterterror efforts failed to thwart the Orlando attacker. As they failed to prevent San Bernardino, Calif., Garland, Texas. Boston. Fort Hood . . .

And yet, in every one of those cases, the feds had their chance. Is something hobbling federal counterterror efforts?

Years before Omar Mateen’s bloodbath at Pulse, the FBI had him on its watch list — twice. He also made two trips to Saudi Arabia. Yet officials couldn’t link him definitively to any plot to commit mayhem.

Add to this unconfirmed reports of more recent warnings to the FBI — from Disney World, after he and his wife seemed to be casing the site, and from the owner of a gun shop where the killer tried to buy level-3 body armor.

Were these dots that went unconnected?

Only the killer is to blame. But Orlando was hardly an isolated failure.

The bureau also had the Tsarnaev brothers on its radar screen before the Boston Marathon bombing. It probed Elton Simpson before he took part in the hit on the “Draw Mohammed” event in Garland.

Tashfeen Malik made it through a Homeland Security screening and later joined Syed Farook in the San Bernardino shooting. Agents cleared Maj. Nidal Hasan prior to his Fort Hood rampage.

What gives?

FBI Director James Comey says trying to ferret out lone wolves is like “looking for needles in a national haystack.” His agency usually has 1,000 open cases of suspected domestic terrorists on its plate at a time.

And US counterterror efforts have thwarted scores of plots over the years.

But as National Review’s Jim Geraghty notes, the feds “have enormous resources devoted to counterterrorism,” well beyond the FBI — including thousands of agencies, private groups and military commands.

Yet they all operate under real constraints — including not just proper regard for civil liberties but also orders from a White House that obsessively fears seeming anti-Muslim.

Here’s one notable example: James Brennan, then deputy national security adviser for Homeland Security and Counterterrorism, in late 2011 ordered a purge of all federal law-enforcement “training materials that contain cultural or religious content, including information related to Islam or Muslims.”

In other words, the FBI’s political overseers ordered it not to husband expertise on Islamist self-radicalization — and the bureau’s bureaucrats, from Comey on down, complied. The same idiocy rules the entire Obama effort at “countering violent extremism.”

Bad as it is that President Obama refuses to use the words “Islamist terror,” it’s far worse that he’s put blinders on everyone who’s supposed to be keeping America safe.