Consider this possibility: What if the best thing we can say about the Federal Bureau of Investigation’s abominable performance in Russiagate is that the bureau was a willing participant in the most audacious political dirty trick in American history? That is, the 2016 Hillary Clinton campaign developed a scheme to portray Donald Trump — the rival candidate and subsequently the president — as a clandestine agent of Russia, and the FBI collaborated, mostly nod and wink, trying here and there to cover its tracks but leaving enough of a trail that we can see that its collusion was purposeful.

This would be condemnable. A free, functioning democracy cannot abide intrusion into its electoral politics of unaccountable partisan bureaucrats who wield the government’s investigative powers and leak their suspicions and cherry-picked “evidence” to complaisant journalists. Such an abomination would not just call for the purging of bureau officials complicit in the scheme. Also in order would be a full-blown congressional probe, akin to the Church Committee’s deep dive in the 1970s into intelligence abuses, to assess whether the bureau’s mission ought to be rethought.

Such an inquiry would delve into how the government collects intelligence in the domestic national-security context — in particular, how it resolves the tension between, on the one hand, respecting constitutionally political activity and, on the other hand, combating efforts by hostile regimes and their American-citizen confederates to undermine our institutions and political processes. With respect to the FBI, the question is whether the critical mission of serving as America’s domestic-security service, responsible for counterintelligence operations against agents of foreign powers, is one we can prudently assign to what is also supposed to be the nation’s leading federal law-enforcement agency. Critical as both security missions are, foreign counterintelligence and domestic law enforcement are not just different; they are in many ways at cross-purposes. Should the FBI really be doing both? And if it does both, can it do them effectively? Can it do either of them effectively?

Those would be the pressing questions in the best-case scenario — to repeat, the supposition that mere partisan corruption drove the bureau’s performance in Russiagate — i.e., the Trump–Russia counterintelligence investigation that the FBI formally opened in the summer of 2016, “Crossfire Hurricane.” There is, however, a more chilling scenario, one that appears increasingly likely as special counsel John Durham’s four-year investigation trundles toward its conclusion. What if the FBI is just plain incompetent?

Mind you, that does not rule out corruption. Unlike counterintelligence and law enforcement, corruption and incompetence are comfortable companions.

Historically, the bureau has been a good police force. Still, its presentation as “America’s premier law-enforcement agency” (as Willard M. Oliver put it in The Birth of the FBI) has always been overdone. One of the many indecorous elements of the complicated legacy of FBI founder J. Edgar Hoover is the unceasing promotion of the bureau as a cultural icon. The ethos remains: To sully the FBI’s reputation is a sin graver than any mission failure that can be kept under wraps. The bureau’s robust public-relations department, its cultivation of the press, its lionization in such movies as The Untouchables and The Silence of the Lambs, not to mention The F.B.I., the long-running series that made Efrem Zimbalist Jr. a household name in the golden age of broadcast television — no other government agency has ever aggrandized itself with greater zeal.

Until recently, that worked like a charm. The bureau has enjoyed broad popularity and commensurate political clout. The clout remained even after Hoover’s epic 48-year reign, which extended from 1924, when he took over the Justice Department’s “Bureau of Investigation” (not long after making his mark in the raids of Wilson-era attorney general A. Mitchell Palmer to apprehend and deport suspected Communists and anarchists), through the formal creation of the FBI in 1935, until his death in 1972. He hung on even though many top officials wanted him gone (including some presidents whose political bidding he did), and even after such abuses of COINTELPRO (“counterintelligence program,” ca. 1956–71) as the extortionate harassment of Martin Luther King Jr. and the illegal spying that ultimately induced the Justice Department to drop prosecutions against the Weather Underground and other prolific domestic terrorists. Hoover’s endurance owed largely to the in terrorem effect of secret files he kept on D.C.’s movers and shakers. Contrary to bureau talking points, the director’s presumptive term does not extend to ten years to underscore the FBI’s independence from partisan politics; Congress reduced it to ten years to insure against a director’s ever again becoming practically unremoveable. (Constitutionally speaking, the director serves at the pleasure of the president.) To this day, the FBI’s headquarters in Washington bears Hoover’s name. The bureau has never extirpated his spirit, even as it has tried to distance itself from dark chapters of his record (which were laid bare in 1975 by then–acting attorney general Laurence H. Silberman, the iconic jurist who died on October 2).

Thanks to its self-promotion, “the Bu,” as its denizens refer to it, has always been overrated, even at its best. But neither has “FBI” rightly stood for “famous but incompetent,” as its detractors in big-city police departments derisively maintain — in envy as much as frustration.

Mainly, the bureau is different, as American law enforcement goes. Its scope is not just national but global, with about five dozen legal-attaché offices across the world, in addition to 56 field offices and sundry satellites throughout the country. There are fewer than 13,500 FBI agents, about a third the number of cops in the New York City Police Department, though the FBI’s $10 billion annual budget is comparable to the NYPD’s $11 billion because the bureau has a massive support infrastructure of administrators and specialists, bringing the total workforce to about 35,000. There are many federal law-enforcement agencies dedicated to narrower missions — the Drug Enforcement Administration, the Bureau of Alcohol, Tobacco, Firearms and Explosives, U.S. Customs and Border Protection, and the Criminal Investigation division of the Internal Revenue Service, to name a few. But only the bureau does it all. Statutorily, it is the lead federal investigative agency for most of the federal offenses over which it has jurisdiction. And it manages an array of joint federal–state task forces — on organized crime, illegal narcotics, street gangs, bank robberies, kidnapping, financial fraud, cybercrime (including trafficking in child pornography), motor-vehicle theft, and so on. Through these arrangements it benefits from the force multiplier of local cops’ being authorized to enforce federal law unfettered by their state’s jurisdictional limitations.

The best known of these collaborative arrangements is the Joint Terrorism Task Forces. The first JTTF sprang up in New York City in the 1970s during the radical Left’s rampages, which included 1,900 bombings in the United States in 1972 alone. This brings us to the FBI’s night job: domestic security.

In addition to its expansive law-enforcement duties, the FBI grew up as the nation’s domestic-security service. Things weren’t really conceived this way. As tends to happen in American history, they developed spontaneously, in reaction to crises. Even after the World Trade Center was bombed in 1993, not much governmental thought was given to whether courtroom prosecution was an apt enforcement paradigm for foreign jihadist organizations that orchestrated mass-murder attacks in overseas havens where the writ of American law did not run. It took the killing of nearly 3,000 Americans on 9/11, more than were killed in the Pearl Harbor attack, to make us see a national-defense challenge that required combat operations rather than indictments. Similarly, not much thought was given to whether domestic security against enemies seeking to destroy the United States would best be handled by law-enforcers whose principal task is investigating crime in a society where the accused are presumed innocent. Nonetheless, for as long as there has been an FBI, it has had both missions.

Post hoc, as the administrative state matured after World War II, a theory for this arrangement emerged, and it is a sensible one. The backbone of domestic security is counterintelligence, which involves spying on hostile operatives. Most U.S. spy agencies are concerned with foreign threats. They must prioritize secrecy because they make perilous intelligence-collection efforts in countries where such espionage is illegal and harshly punished if uncovered. Inside the United States, however, where the Constitution safeguards Americans from overbearing and lawless government action, we must insist that our domestic-security mission be assigned to an agency whose activities are controlled by American law — whose surveillance operations, for example, are consistent with and confined by the Fourth Amendment and due process of law.

The FBI is bound by those constraints . . . at least in theory. In practice, things are not so straightforward.

The objective of policing is to respond to crime. Of course we want to discourage quotidian illegal activity. But we do that by appropriately aggressive investigation and prosecution, generally after crimes have occurred. Our standard for search and arrest warrants is the showing of probable cause that a crime has been or is being committed, not that it is about to be. Much of the evidence of criminal schemes, moreover, involves constitutionally protected activity — association, speech, the ostensibly legal use of one’s property, etc. We don’t send in the SWAT team on mere suspicion that the corner market is about to be robbed; in a free society, where government serves rather than rules the people, we achieve the rule of law and the prosperity it yields by conveying that the laws will be enforced and that therefore the crime is not worth the punishment that would surely follow.

In criminal justice, we hope that officers are honorable, but we don’t bank on it. The guarantee of due process keeps the police honest. Secrecy must be maintained in the investigative phase — police and prosecutors go ex parte to the court for warrants without giving notice to the suspect, and grand-jury proceedings are secret by statute. But there will be public charges and then a liberal discovery process in which experienced defense lawyers will pore over the details of the investigation, the tactics used by police, and the representations the officers made to the court. Even if an investigation does not result in charges, ordinary law enforcement is not classified. Between internal reviews, legislative oversight, and Freedom of Information Act litigation, any serious police abuses are apt to become public. The consequences for a rogue cop or agent can be severe: judicial rebuke, demotion, suspension, termination, and, if the abuse is egregious enough, prosecution.

The bedrock assumptions and procedural rigor of the justice system breed a culture of rectitude and competence in an effective police agency.

An effective intelligence agency has different assumptions, different priorities, and, naturally, a different ethos. The contrast is stark.

The objective of domestic security is to prevent potential threats from metastasizing into attacks, coups, or similar catastrophes. It is an intelligence mission. The point is to gather precious information about the malign intentions and thereby thwart the plots of actors who are looking not just to score some ill-gotten gains but to destroy or at least radically remake the society. Intelligence officers who wait to take action until they have probable cause that a crime has been or is about to be committed have usually waited too long. The result will be not just a robbery; it could be a mass-murder attack.

It is not so difficult for a single agency to assimilate the divergent law-enforcement and domestic-security missions when the security threats are foreign powers. Things get more complicated, however, when the security threats are American citizens, whether acting on behalf of foreign powers or participating in domestic groups. The scheming of Americans against their own government and fellow citizens is invariably bound up with dissent, association with like-minded dissenters, and other acts protected by constitutional guarantees that aliens cannot fully claim.

The Supreme Court grappled with this vexing challenge in the 1972 Keith case, when it first required the FBI and Justice Department to obtain judicial warrants before conducting surveillance against Americans suspected of plotting to overthrow the government. In the aftermath of the Church Committee, Congress dubiously extended the logic of Keith to foreign threats, enacting the 1978 Foreign Intelligence Surveillance Act (FISA), which requires warrants from a secret federal court before the FBI may monitor suspected agents of foreign powers — whether those agents are American citizens or aliens. The proceedings of that tribunal, the Foreign Intelligence Surveillance Court (FISC), are classified. There is no discovery and minimal due process for surveillance. The FISA system does not keep the police honest.

Russiagate illustrates what a disaster this has led to, but it’s been coming for a long time. After the 1993 World Trade Center bombing, the Clinton administration decided to regard jihadist terrorism as a law-enforcement issue, prioritizing the FBI as the nation’s top security agency even in liaison with foreign governments, where the CIA had enjoyed pride of place. This subordination of the bureau’s law-enforcement protocols to its domestic-security mission intensified after 9/11, when, understandably, there was intense criticism of the Clinton administration’s “wall” — a set of procedural safeguards put in place to prevent counterintelligence operations, with their minimal due-process standards, from covertly steering criminal investigations.

Such compartmentalization is a commonplace in law enforcement where, for example, if the government becomes aware of information subject to a confidentiality privilege (say, attorney–client or doctor–patient communications), police and prosecutors are forbidden from using that information to build criminal cases. But compartmentalization has no place in national-security operations, where any available intelligence must be exploited to safeguard the homeland and American interests abroad. From a law-enforcement perspective, the wall made sense. As a national-security policy, it was lunacy — and jihadist terrorism is a national-security issue. Because the wall effectively barred intelligence agents from sharing information with their criminal-investigator counterparts, the bureau missed key evidence of terrorist plotting whose recognition might have prevented the suicide hijackings.

In the overcorrection to that failure, the bureau became an intelligence agency with a law-enforcement sideline. Except it is not an effective intelligence agency, and its prioritization of secrecy over due process has eroded its competence and trustworthiness as a law-enforcement agency.

Russiagate is the fallout.

Investigations are supposed to be run in field offices, to give agents insulation from the politics of Washington. Headquarters performs the indispensable role of supervision, preventing agents, who get very invested in their cases, from transgressing FBI protocols designed to keep them within legal bounds. But in 2016, in Hooveresque fashion, FBI headquarters decided to get operational. Under the hands-on management of Andrew McCabe, the bureau’s deputy director at the time, coordinating closely with then-director James Comey, the top of the FBI’s hierarchy took over the politically fraught investigations of the two major-party candidates. When headquarters becomes the investigator, there is no detached supervisor to keep it on the straight and narrow.

Internal inquiries by the Justice Department’s inspector general established significant political bias against Donald Trump by the bureau’s investigators. It redounded to Hillary Clinton’s benefit. First, FBI headquarters cleared her of wrongdoing in the emails scandal, despite finding she’d recklessly mishandled classified information and destroyed thousands of government records. Clinton still grouses that FBI disclosures cost her the election; she may be right, but she wouldn’t have been able to run if Comey had not broken protocol, arrogated the Justice Department’s charging discretion to himself, and publicly exonerated her (which is never the job of an investigator or prosecutor).

Then, as prosecutions in Durham’s investigation have revealed, the bureau knowingly took Clinton-campaign-generated opposition research — much of it outlandish and uncorroborated — and used it as the premise to investigate Trump as a clandestine agent of Russia. When the government investigation leaked to the media, the Clinton campaign predictably exploited the news in the race’s final weeks. (She lost because her weaknesses as a candidate were too profound to overcome, but the Trump–Russia “collusion” narrative benefited her campaign and was a coup for congressional Democrats during Trump’s first years in office.) The FBI well knew that the partisan sources of this information were suspect. When Clinton lawyer Michael Sussmann brought the FBI patently skewed data suggesting that Trump had a communications back channel with the Kremlin, headquarters hid Sussmann’s involvement from its own investigators, falsely claiming that the data had come from the Justice Department. When the bureau took farcical “intelligence reporting” from former British spy Christopher Steele, who it knew was generating the reporting for the Clinton campaign, it offered Steele $1 million if he could corroborate his allegation that Trump was in a “conspiracy of cooperation” with Vladimir Putin’s regime. Steele could not verify his claims, yet the FBI relied on them in four sworn “verified applications” for FISC warrants, submitted 90 days apart, from October 2016 through June 2017 — i.e., well into the first year of Trump’s presidency. Agents withheld from the court Steele’s connection to Clinton’s campaign and the fact that Steele’s main source, Igor Danchenko, had conceded to the FBI that the anti-Trump reporting was bogus.

In sum, the FBI did what the Bill Clinton–era wall regulations were meant to prevent: Lacking grounds for a criminal case, the bureau exploited its counterintelligence authority in hopes of eventually finding something that could be used to drive Trump from office. The FBI did this because, as an intelligence agency serving the progressive political establishment, it was confident that its sources could be concealed from Congress and that its highly classified submissions to the FISC would never see the light of day. When this proved a poor calculation, it led to a more comprehensive audit, which uncovered that — quite apart from Russiagate — the bureau’s submissions to the FISA court over five years (2015–19) were rife with misrepresentations and abuse. In this, the FBI had flouted safeguards put in place two decades ago — precisely because of a similar raft of misrepresentations that enraged the FISC in the 1990s. In 2016, assessing its propensity to misreport its counterintelligence monitoring of American citizens, the FISC bewailed the FBI’s institutional “lack of candor.”

Enough is enough. It is not the FBI’s fault that it has been asked to perform contradictory missions. But the bureau is to blame for performing the domestic-security mission in a politicized, mendacious, and incompetent manner, and for the fact that this malfeasance has deeply compromised its credibility as a law-enforcement agency. For now, we await Special Counsel Durham’s comprehensive final report on Russiagate. After that, the next Congress must be prepared to conduct a searching bipartisan investigation of the FBI. Lawmakers should be prepared to confine the bureau to its law-enforcement mission, which is vital. The domestic-security mission should be handled by a pure intelligence agency with no law-enforcement powers, in a manner similar to Britain’s MI5. That intelligence agency should be subjected to extensive congressional and Justice Department oversight, with highly restricted liaison to law enforcement, limited to significant national-security threats.

Russiagate is a dark chapter, but one that shouldn’t shock us. Its harbingers have flashed for decades. Learning its lessons could save the FBI.

The nation needs the FBI to be a monument to the rule of law.

That’s going to take some work.