Even before the startling disclosure that the FBI failed to investigate a warning that the suspect, Nikolas Cruz, could be plotting an attack, the bureau was facing unprecedented criticism from President Donald Trump and other Republicans, who have accused it of partisan bias.
The agency and its supporters had been able to dismiss past criticism as just politics, but this time it had no option but to admit it made a disastrous mistake.
Wray, on the job for just six months, had already been in a precarious position defending the bureau from relentless attacks by Trump and other Republicans.
They are still dissatisfied with its decision not to charge Hillary Clinton with crimes related to her use of a private email server, and they see signs of bias in special counsel Robert Muellers probe of possible Trump campaign ties to Russia.
More From This Section
Through it all, Wray has repeatedly stood up to Trump, defending the bureaus independence and publicly praising its agents in implicit rebuttals to the presidents criticism.
Wray unsuccessfully fought to block the release of a classified Republican memo accusing the FBI of abusing its surveillance powers in the Russia probe a document Trump wanted aired.
Wray also publicly contradicted White House accounts of how it handled recent domestic abuse allegations involving an aide.
Yesterday, the bureau said it had failed to act on a tip that Cruz had a "desire to kill people," disturbing social media posts and access to a gun.