Former CIA and FBI Director William Webster declared in an op-ed Monday that the Federal Bureau of Investigation is not a “broken institution” and criticizing it threatens the “rule of law,” in an attempt to quell public outcry over agents’ misconduct during the 2016 election.

Webster’s full-throated defense of the two agencies comes amid the fallout from the Department of Justice Inspector General (IG) report, in which it was confirmed that FBI officials made 17 “significant inaccuracies and omissions” in its submissions to the FISA court to obtain warrants to surveil former Trump campaign adviser Carter Page during the 2016 presidential election.

“The privilege of being the only American in our history to serve as the director of both the F.B.I. and the C.I.A. gives me a unique perspective and a responsibility to speak out about a dire threat to the rule of law in the country I love,” Webster wrote in the New York Times. “Order protects liberty, and liberty protects order. Today, the integrity of the institutions that protect our civil order are, tragically, under assault from too many people whose job it should be to protect them.”

“The rule of law is the bedrock of American democracy, the principle that protects every American from the abuse of monarchs, despots and tyrants. Every American should demand that our leaders put the rule of law above politics,” he added.

Webster then lashed out at President Donald Trump for criticizing the FBI over DOJ Inspector General Michael Horowitz’s findings, suggesting his remarks threaten the bureau’s independence. The former official expressed his full confidence in FBI Director Christopher Wray and said the notion that he could be removed from his post, akin to the bureau’s previous director, James Comey, “disturbs me greatly.”

“The president’s thinly veiled suggestion that the director, Christopher Wray, like his banished predecessor, James Comey, could be on the chopping block, disturbs me greatly,” he wrote. “The independence of both the F.B.I. and its director are critical and should be fiercely protected by each branch of government.”

Webster then took aim at the president for referring to anti-Trump FBI officials implicated in Horowitz’s report as “scum” and attempted to cast doubt on Attorney General William Barr’s independence, citing U.S. Attorney John Durham’s now-criminal investigation into the origins of the FBI’s Russia probe.

“I know firsthand the professionalism of the men and women of the F.B.I. The aspersions cast upon them by the president and my longtime friend, Attorney General William P. Barr, are troubling in the extreme Calling F.B.I. professionals ‘scum,’ as the president did, is a slur against people who risk their lives to keep us safe,” he wrote. “Mr. Barr’s charges of bias within the F.B.I., made without providing any evidence and in direct dispute of the findings of the nonpartisan inspector general, risk inflicting enduring damage on this critically important institution.”

He continued: “As a lawyer and a former federal judge, I made it clear when I headed both the F.B.I. and the C.I.A. that the rule of law would be paramount in all we did. While both agencies are staffed by imperfect human beings, the American people should understand that both agencies are composed of some of the most law-abiding, patriotic and dedicated people I have ever met. While their faces and actions are not seen by most Americans, rest assured that they are serving our country well.”

Webster’s op-ed comes one day after Comey conceded the IG report revealed the bureau’s “sloppiness” with respect to its FISA application use against the Trump campaign.

“He’s right. I was wrong,” Comey told Fox News Sunday when pressed on Horowitz’s findings. “I was overconfident as director in our procedures of the FBI and Justice have built over 20 years years. I thought they were robust enough. It’s incredibly hard to get a FISA. I was overconfident in those because he’s right, there was real sloppiness — 17 things that should have been in the application or at least discussed and characterized differently. It was not acceptable, so he’s right.”

Comey’s admission prompted President Trump to once again demand the fired FBI director to apologize for surveilling his campaign and even hinted that he could face imprisonment for the deeply flawed probe.

“So now Comey’s admitting he was wrong. Wow, but he’s only doing so because he got caught red handed. He was actually caught a long time ago. So what are the consequences for his unlawful conduct. Could it be years in jail? Where are the apologies to me and others, Jim?” the president tweeted.