As America weighs abuses of power in this season of impeachment and trial, it’s worth taking a careful second look at the FBI’s behavior during its “Crossfire Hurricane” investigation of the Trump campaign in 2016. Republicans are outraged by what happened, and Democrats should be, too.

It’s not that the FBI’s misdeeds excuse those of Donald Trump’s. Quite the opposite: Reckless statements by Trump and his advisers during the 2016 campaign worried the FBI so much that officials began making bad decisions and covering up their mistakes. The spooks got spooked.

But accountability can’t become a partisan issue, or we’re sunk as a country. So it’s especially important for President Trump’s critics, even as they make their case that he should be removed from office, to recognize that the bureau abused some of its most sensitive powers when it authorized intrusive surveillance on Trump adviser Carter Page.

The deeply disturbing tale of the FBI’s actions was narrated by Justice Department Inspector General Michael Horowitz last month in a dense 434-page report. It’s worth a careful review, especially now, when Trump’s impeachment trial has us all thinking about how to safeguard our democracy.

The FBI had a nightmare problem in July 2016. An Australian official had passed along a tip that “the Trump team had received some kind of suggestion from Russia that it could assist” with information that would damage Hillary Clinton, Trump’s rival. Should the bureau have ignored this allegation? Obviously not.

On July 31, the bureau launched Crossfire Hurricane. An internal memo stated that “this investigation is being opened to determine whether individual(s) associated with the Trump campaign are witting of and/or coordinating activities with the Government of Russia.” The decisive voice was E.W. “Bill” Priestap, a career official then heading the FBI’s Counterintelligence Division, who told Horowitz that the bureau was “obligated” to conduct the investigation.

So far, so good. Horowitz’s report concluded that the FBI’s decision to investigate the Trump team had an appropriate “authorized purpose.”

But the inquiry began to jump the tracks in October 2016, when the FBI sought authority for intrusive spying on Page. Horowitz found that bureau officials supplied incomplete or misleading information to support their request to the Foreign Intelligence Surveillance Court for the October warrant for Page and for three renewals that carried the targeting through September 2017.

One abuse was especially outrageous: As the FBI pressed for the Page FISA warrants, it overlooked an August 2016 CIA message that Page had been an occasional “operational contact” for the agency. That’s not the same as a vetted agent, but it should have made FBI officials wonder whether their assumptions about Page’s possible disloyalty and double-dealing were justified.

The CIA told the bureau that Page had been approved as a contact from 2008 to 2013 and that he had “candidly described his contact” with a Russian intelligence officer the bureau feared had recruited him. The FBI ignored this and other exculpatory information.

Worse still, a mid-level FBI official in the office of general counsel, after checking with the CIA in June 2017 about the agency’s past relationship with Page, inaccurately told a colleague that the CIA “confirmed explicitly he was never a source” and then inserted in a CIA email that Page was “not a source.”

The FBI official apparently lied because he wanted to avoid a “terrible footnote” in the latest FISA renewal, admitting the embarrassing fact that the bureau had overlooked the CIA’s relationship with Page in previous filings, according to Horowitz’s narrative. The official has been fired and is under criminal investigation.

Why didn’t the CIA speak up, as Page was being pilloried in public leaks? That’s another good question.

Some Republicans have seen a deep-state conspiracy in these actions. But to me, the Horowitz report suggests the opposite. The intelligence community was so sloppy and disorganized — and so disoriented by the Trump investigation — that it couldn’t coordinate simple tasks, let alone organize a plot.

The bureau failed in its simple duty to “make sure that the left hand knows what the right hand is doing,” as one FBI official put it to Horowitz. This is a tale of dazed, incompetent bureaucrats covering their backsides, not a coup.

Fixing America’s problems should begin at the top, with an impartial Senate trial assessing Trump’s alleged abuses of power. But especially at this disruptive, partisan moment, reforms are needed at every level. The FBI badly abused its power in Crossfire Hurricane, and as Director Christopher A. Wray said last month, it needs “thoughtful, meaningful remedial action.” On that, surely, Republicans and Democrats can agree.

Read more: