Washington (CNN) A former head of the FBI and CIA says President Donald Trump and Attorney General William Barr's harsh criticism of the bureau in the wake of an inspector general report about the origins of the Russia investigation are "dangerous and unwarranted" and a "dire threat to the rule of law."

"Today, the integrity of the institutions that protect our civil order is, tragically, under assault from too many people whose job it should be to protect them," William Webster, the only person to lead both of the intelligence services, wrote in a New York Times op-ed published Monday.

"Calling F.B.I. professionals 'scum,' as the president did, is a slur against people who risk their lives to keep us safe. 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," Webster argued.

Webster wrote that the "aspersions cast upon" the FBI by Trump and my "longtime friend" Barr are "troubling in the extreme."

Trump, who has long criticized FBI leadership, last week lashed out at Director Christopher Wray after Wray backed the findings of an inspector general report that found the FBI's investigation into Russian election interference was properly launched.

Read More