Editor’s Note: Paul Callan is a CNN legal analyst, a former New York homicide prosecutor and current counsel at the New York law firm of Edelman & Edelman PC, focusing on wrongful conviction and civil rights cases. Follow him on Twitter @paulcallan. The opinions expressed in this commentary are his own.

CNN  — 

The ferocity of President Donald Trump’s recent attacks on the integrity of the FBI has sent shock waves through an agency accustomed to public adulation in recent years. Sadly, much of the presidential criticism of the bureau may be entirely legitimate.

The FBI has traditionally enjoyed a highly favorable reputation among a majority of the nation’s citizens. Despite controversial programs that sometimes employed illegal forms of surveillance and enforcement methods – such as those used on black citizens lawfully protesting racial segregation, individuals in the “red scare” of the 1950s and long-haired students and others protesting the war in Vietnam during the 1960s and ’70s – this reputation endured.

And American presidents continued to steadfastly defend the bureau – that is, until now.

The tradition of presidential support was unquestionably grounded at least partially in the fear of J. Edgar Hoover’s rumored 50-year political skeleton “dossier,” which would undoubtedly make the controversial “Steele dossier” look like child’s play.

But Hoover is gone now, and President Trump’s persistent attacks have the potential to inflict long-lasting reputational damage to the nation’s preeminent law enforcement agency. These criticisms focus largely on FBI fumbles and missteps in the Hillary Clinton and Trump/Russia investigations, which the President suggests were deliberate attempts to sabotage his election and administration. Trump supporters and possibly the President himself say they see the workings of a conspiratorial “deep state” liberal-embedded bureaucracy fiercely resisting any conservative change.

Some of Trump’s recent criticisms of the agency relate to the alleged activities of FBI special agent Peter Strzok and FBI lawyer Lisa Page. An investigation by the Justice Department’s inspector general revealed that the two exchanged text messages strongly indicative of anti-Trump and pro-Clinton bias while Strzok played a critical role in the Clinton investigation and a subsequent lesser role in Mueller’s Trump/Russia probe. (A CNN reporter, in a news article after the text message controversy erupted, wrote that an attorney for Strzok did not respond to a request for comment, and Page could not be reached for comment.)

In addition, the President continues to call the Russia investigation a “witch hunt” and to castigate the agency’s deputy director, Andrew McCabe, for alleged “bias” and incompetence.

Last Saturday, the President tweeted that former FBI Director James Comey, whom he fired, is a “liar” and called him “leakin’ James Comey.”

Trump also issued a clearly derogatory “Wow” comment regarding the unexplained reassignment of the FBI’s general counsel, James Baker, reportedly a close friend of Comey’s.

The President may have been angered by reports that McCabe was backing Comey’s claim that the President made a loyalty demand and requested leniency for his former national security adviser, Gen. Michael Flynn, who is now a convicted felon awaiting sentencing under federal indictment.

When news of the text messages between Strzok and Page came to light against the backdrop of claimed McCabe improprieties, it became harder to just dismiss all of Trump’s FBI conspiracy claims as delusional – though many of his critics do.

Strzok was one of the FBI’s top counterintelligence agents supervising the investigation of Clinton’s controversial email problems. He subsequently joined Robert Mueller’s Trump/Russia investigation, and the question lingers as to why his obvious anti-Trump prejudice was not uncovered in his job interview for the position with Mueller.

Why didn’t McCabe warn Mueller of Strzok’s likely bias, which he should have known from his own day-to-day conversations with Page and Strzok at FBI headquarters? Page reportedly worked for McCabe, who certainly also had frequent contact with Strzok – again, the FBI’s No. 2 counterintelligence agent.

This assessment is admittedly speculative, but it is speculation grounded in common sense.

Strzok was abruptly removed from the Mueller investigation in mid-summer of 2017. It seems that he had exchanged a series of 375 text messages with Page, clearly documenting their joint revulsion at all things Trump. The President is variously described as a “loathsome human,” an “idiot” and a “d*uche,” while they describe the prospects of the President’s election as “terrifying.”

The shocking aspect of the Strzok/Page discussions about the “terrifying” possibility of Trump’s election is that some of those discussions may have taken place, according to one of Strzok’s texts in “Andy’s Office.”

CNN has reported that the text was presumably referring to the office of FBI Deputy Director Andrew McCabe in August of 2016. Page had previously opined, according to the texts: “There’s no way he gets elected.” Strzok, however, texted that even if Trump’s election is a long shot, “I want to believe the path you threw out for consideration in Andy’s office …that there’s no way he gets elected – but I’m afraid we can’t take that risk. It’s like an insurance policy in the unlikely event you die before you’re 40.”

The most benevolent interpretation of this Strzok statement, as suggested by The Wall Street Journal, is that Strzok was advocating a fast and aggressive pursuit of the Russia investigation “because some of Mr. Trump’s associates could land administration jobs and it was important to know if they had colluded with Russia,” according to the Journal’s story.

But there is more. Strzok was the FBI agent who changed the language used by former Director Comey in his controversial July 5, 2016, public statement clearing Clinton of criminal charges regarding her handling of classified materials. Strzok changed the final draft wording of Comey’s statement from “grossly negligent” (which is commonly used in criminal cases) to the softer, non-criminal “extremely careless” wording.

Trump supporters would point to this as evidence that Strzok, the FBI’s No. 2 counterintelligence agent, appears to be executing a plan within the FBI to clear Clinton and then destroy Trump’s candidacy with the Russia investigation.

Causing further headaches for FBI brass, we now know that Deputy Director McCabe’s wife, Jill McCabe, an unsuccessful Democratic 2015 candidate for the state senate in Virginia, had received approximately $700,000 in campaign contributions from then-Virginia Gov. Terry McAuliffe’s political action committee and the state’s Democratic Party. While this didn’t violate any laws or FBI protocols, the association looks unseemly for an agency conducting an investigation with potentially historic implications.

McAuliffe had been the campaign chairman of Clinton’s 2008 presidential campaign and has been described by onlookers as being “as close as family” to the Clintons.

While McCabe’s wife certainly has a right to run for office, her acceptance of hundreds of thousands of dollars in campaign contributions from sources with clear links to the Clintons was a red-flag warning that should have caused McCabe to recuse himself from any involvement in any Trump/Hillary related investigations. He had no business calling any of the shots in these sensitive probes that would likely influence the outcome of the presidential election. The FBI has stated that that McCabe acted in accordance with stated agency protocols while his wife was running for office.

McCabe remains a very important figure in the unfolding Mueller investigation; the latest reports are that McCabe may be a key witness backing Comey’s claim that the President had improperly asked him to terminate the Flynn investigation. McCabe’s credibility, however, may now be compromised by the facts and circumstances regarding Strzok’s text messages, the meetings in “Andy’s Office” and the political contributions given to McCabe’s wife.

While I rarely agree with much of what the President does or says regarding legal issues, this time he’s got it right. The FBI’s reputation has been severely damaged not by the President’s criticism but by a systematic failure of the bureau’s leadership.

The field agents of the FBI should still retain the trust of the American people. Their honor and dignity has not been compromised; but the bureau’s leadership ranks require a prompt and thorough house cleaning by the new director, Christopher Wray. The bureau’s leadership has forfeited the reputation of a cherished American institution.