Jim Comey learned Tuesday afternoon the difference between being independent and being out on a limb. After years of charting his own course in a city that prides itself on loyalty, after marching to the beat of his own drum in a political culture that’s increasingly divided into teams, after making up the rules as he went along in a Justice Department that prides itself on precedent and tradition, the FBI director found this week that he had run out of time and run out of friends.

In becoming just the second FBI director ever to be removed from office for cause—with more than six years remaining on his 10-year term—Comey leaves just as ignominiously as William Sessions did when he was fired by the newly arrived President Bill Clinton in 1993. Sessions, under fire due to scandals involving his wife and improper spending, had stubbornly refused to leave until Clinton summarily threw him out of the Hoover Building.


Yet Comey leaves behind an even more troubling legacy: The FBI soon forgot the Sessions years, but it will be years before its public reputation recovers from the intense political firestorm that Comey plunged it into last summer with a fateful news conference. On July 5, 2016, Comey announced the FBI would not recommend charges against Hillary Clinton for using a personal email server to conduct the government’s business as secretary of state—and then, after making that already unprecedented announcement, proceeded to expound at length upon his own interpretation of the law and Clinton’s mind-set. It was a moment that left jaws wide open across the street at Main Justice, as well as up Pennsylvania Avenue at the White House—the original sin that begat months of turmoil and ultimately cost Comey the job he’d long dreamed of having.

Comey’s firing deservedly shocked official Washington on Tuesday afternoon, but to those who know the bureau well, the idea of Jim Comey and Donald Trump coexisting in Washington has never made much sense—and that was even before recent weeks have made clear the depth and scope of the FBI’s still-widening investigations into Trump’s own campaign and its ties to Russia. It wasn’t all that long ago that Trump was embracing Comey in the East Room of the White House. Two days after his inauguration, Trump greeted his new top cop by joking with observers, “He’s become more famous than me.” In the end, perhaps that will be remembered as Comey’s greatest sin. He forgot the most important lesson of his post: In Washington, FBI directors should be like children—seen but not heard.



***

Many in Washington had feared for Comey’s job since the election—and Democrats privately hoped that precisely the instincts that led him to wade into last summer’s campaign in an attempt to preserve the bureau’s independence would guide him through the challenges of navigating a still-growing investigation into the president’s own legitimacy and behavior. “I wish it hadn’t unfolded like it did, but now that Trump’s president, I wouldn’t want anyone other than Comey to be where Comey is,” one top Obama administration official told me.

Lawfare writers Susan Hennessey and Benjamin Wittes, a friend of Comey’s, wrote soon after the election that if the FBI director were eventually fired it would be “a clear bellwether to both the national security and civil libertarian communities that things are going terribly wrong.” And indeed Comey’s surprise firing Tuesday while he was speaking to FBI employees in Los Angeles created an immediate parallel with the “Saturday Night Massacre” that saw Richard Nixon oust the Justice Department leadership in an attempt to stall investigations into his own White House. The ouster immediately plunges the FBI, the Justice Department and official Washington into turmoil unlike anything the capital has seen since Watergate itself.

Yet the ouster also came just hours after the latest political stumble by Comey himself, who evidently misstated in congressional testimony last week by a large margin the number of emails that Clinton had once forwarded to her aide Huma Abedin. An FBI official apologized and corrected the record in a letter to Congress on Tuesday—and adding another footnote to the evidence pile that President Trump used to justify firing the head of the nation’s most prestigious law enforcement agency.

It’s entirely possible that Trump—given both the seriousness of the Russia allegations and the White House’s increasingly desperate attempts to stymie, bury or distract from the darkening headlines—would have fired whomever was sitting in the chair of the FBI director in the Hoover Building overlooking the Trump hotel across Pennsylvania Avenue. As the president said Tuesday in his awkward dismissal letter, “While I greatly appreciate you informing me, on three separate occasions, that I am not under investigation, I nevertheless concur with the judgment of the Department of Justice that you are not able to effectively lead the Bureau.”

There are already hints that Attorney General Jeff Sessions was gunning for Comey at the White House’s request, but Trump’s letter firing the FBI director came attached to memos from both the attorney general and deputy attorney general that concluded Comey had compromised the bureau’s integrity and reputation.

It’s a conclusion that few in Washington will argue with today. As interviews with current and former FBI agents and executives as well as officials at the Justice Department and both the Obama and Trump White Houses make clear, Comey has spent the past year delivering enemies on all sides all the evidence they needed to conclude that he had become uniquely compromised as FBI director. That cover may prove a fig leaf for Trump’s real reason—hoping to avoid Comey’s tenaciousness as a prosecutor as he finds himself in the FBI’s spotlight—but the seeds of Comey’s downfall have been germinating for years.

Ever since the days of J. Edgar Hoover and the taint of Watergate, the FBI has done everything it can to eschew politics. When, during the tenure of Comey’s predecessor Robert Mueller, the special agent-in-charge of the New Orleans Field Office even hinted in a newspaper interview that he might one day consider running for political office, the agent was removed before lunchtime—before even Main Justice had time to call over to question the comment.

Yet Comey over the past year had plunged into the political abyss, throwing aside years of carefully crafted caution through which the FBI has tried to remove the stain of Hoover’s dark power politics. Throughout his own journey, Comey became increasingly isolated, turning off one by one the friends who might have saved him from being fired by Trump.

“He seemed to think that what was good for Comey is good for the institution. That’s jarring,” one senior Justice Department official said.

Much of the story of life inside the bureau over the past year remains to be written, but the truth is far less sinister than many might believe. Rather than a carefully considered “deep state” conspiracy to sink Clinton, the FBI’s yearlong hot potato game with her emails is more a carnival of errors and misjudgments, all driven by a deep fear that the FBI and Comey would stand accused of the very thing that slowly undermined his reputation and ultimately resulted in his firing: the appearance that he had politicized the FBI.



***

Comey has spent his career in Washington biting the hand that feeds him—and for years, that was precisely what led his career to advance.

A Republican appointee to top Justice Department officials, Comey had burned bridges with many in the GOP during his surprise 2007 congressional testimony, crafted in conjunction with then-Senate counsel Preet Bharara, who it so happens was also fired by Trump several weeks back amid the usual partisan changeover of U.S. attorneys. That famous testimony outlined a cinematic showdown in March 2004 between the Justice Department and George W. Bush’s White House over the legality of an NSA surveillance program codenamed STELLAR WIND. Ever since then, Comey—who left the Bush Justice Department for the private sector, first with Lockheed and later with the hedge fund Bridgewater Associates—had been jokingly called in Washington circles “the Democrats’ favorite Republican.”

The STELLAR WIND showdown turned into the Jim Comey Creation Myth, the moment that made clear that he was as independent as they came and would pursue investigations and enforce justice without fear or favor. Whereas deputy attorneys general like Comey come and go nearly routinely and anonymously, that showdown—and Comey’s decision to kiss and tell—made him a person of stature and standing who could lead the nation’s most famous and storied law enforcement agency. It also set up a pattern of behavior that would ultimately lead to his downfall—always willing to speak out, controversial and unafraid of attempts to silence him. As one senior official told me, “He’s rapturous of his own righteousness.”

It was that righteousness, too, that led Barack Obama to appoint Comey to head the FBI in 2013, in part because his iconoclastic reputation ensured Republicans could be assured of his independence—the fact that he’d donated to Mitt Romney and to John McCain didn’t hurt, either. And in his early days as director, Comey worked hard to separate the bureau from the ugliest moments of its history.

During his first year, he ordered that new agents tour the Martin Luther King Jr. memorial as part of a lesson highlighting how Hoover had illegally monitored King and later even attempted to blackmail him into giving up his quest for civil rights.

Comey had until recently been perhaps the most popular FBI director inside the bureau since Hoover; easygoing and relaxed, the towering 6-foot, 8-inch figure, a legend in prosecutorial circles, was seen as the yin to the yang of his Marine-sharp predecessor Mueller, who had led the FBI through 12 years of wrenching change and evolution following the September 11, 2001, attacks. Comey inherited a righted ship and took the time to tour nearly every one of the FBI’s 56 field offices in his first year, meeting agents, analysts and staff in casual conversations, sometimes not even wearing a suit jacket or blazer—a radical shift in tone in an agency that sees anything other than a dark suit, white shirt and tie as effectively beach casual. After intense years of upheaval under Mueller, one where he upended long-standing and beloved personnel policies and reoriented the bureau to face international threats like terrorism and cybersecurity, Comey was able to project himself as a man-of-the-agents.

He joked in his first year about how maybe the FBI needed to loosen up in order to attract better cyber agents. “Some of those kids want to smoke weed on the way to the interview,” Comey told a New York crowd, only to be chastised two days later during a congressional hearing by an Alabama senator named Jeff Sessions for providing “one more example of leadership in America dismissing the seriousness of marijuana use.”

Yet his deeply philosophical nature—he was a religion major at the College of William & Mary—and independent streak continued to get him in trouble in the Obama administration. He spoke in frank terms about racism and policing, and repeatedly cited a seemingly mythic “Ferguson effect” that he said had led police to worry about doing their jobs in the wake of national protests. That message clashed with the White House’s careful, measured approach on racial issues—as well as the messages of his own Justice Department, which was trying to help reform genuinely troubled and deadly police agencies from Baltimore to Chicago to Ferguson.

Comey also publicly clashed with Silicon Valley over surveillance and encryption in the wake of the mass shooting in San Bernardino, picking a high-profile fight with Apple CEO Tim Cook and alienating industry leaders.

“Jim Comey always has to be positioned oppositional to those in power,” one former Justice Department official told me. “He’s done huge, lasting damage to the FBI brand, but he’s done good protection of Brand Comey.”



***

Part of the reason he held last summer’s news conference was to make clear to his own workforce the reasoning behind the FBI’s decision. It was also an extension of the corporate philosophy he’d learned at Bridgewater, a company that has as one of its core tenets “radical transparency,” a philosophy he so connected with that he starred in one of the hedge fund’s recruiting videos.

Few inside Comey’s circles expected the instant blowback that came from Clinton’s campaign, which remains furious about his intervention, and even from other seasoned former Justice Department stalwarts. “We’d already mortgaged his reputation and taken a hit,” an FBI insider told me. “We were thinking ‘Shut up—she’s going to be president. We just saved her presidency.’ Maybe we were naive.”

The news conference pleased no one—and even Comey’s peers were skeptical of his decision not to pursue charges against the former secretary of state. At a dinner for the police chiefs in October before the election, he sat awkwardly sandwiched between two conservative sheriffs who cross-examined him through the meal. Comey remained adamant: There was no case against Hillary. Then, days later, he dropped the biggest bombshell of the campaign: He dropped The Letter—the one that instantly leaked as soon as it reached Capitol Hill, the one announcing he was reopening the Clinton investigation mere days before a presidential election.

It was the ultimate October surprise—Comey’s bungling of a new fount of emails on Anthony Weiner’s laptop that might have helped fill in a six-week hole in Clinton’s files from early 2009.

Often overlooked in the context of The Letter was an incident just days earlier that had left the FBI’s seventh-floor executive suite reeling. News reports had criticized Deputy Director Andy McCabe—an apolitical and beloved career agent—because his wife, a state Senate candidate in Virginia, had received a sizable and entirely legal campaign donation from Democrat Terry McAuliffe, the Virginia governor and close friend of the Clintons.

While the “conflicted spouse scandal” is one of Washington’s oldest political genres—the power-hungry town often sees spouses on opposite sides of the same issue—the FBI had never before experienced such an incident and was left flat-footed in its response. According to multiple sources inside the bureau, that incident deeply influenced the thinking of top executives as they contemplated which course to chart through the Weiner emails. “The Republicans were already working the refs,” one FBI executive told me. They didn’t want to risk even more fire by keeping the investigation under wraps.

Besides, as one bureau official after another has made clear to me in recent months, Comey never expected Clinton to lose. He saw The Letter as the politically expedient thing to do to help bolster the legitimacy of her victory—and preserve the FBI’s apolitical reputation. “The worst-case scenario [in his mind] was she was going to be really pissed [at him],” one executive told me. “But then we’d sit her down and tell her it was her fault we were in this position.”

As the executive said, no one around Comey thought it would make a difference. “It’s easy to do the right thing when you don’t think it’s going to matter,” this person told me.

Few saw Comey’s October surprise as anything less than a shot at Clinton; within hours, Trump was exulting over the reopening of the case at a campaign rally. And when, after a Herculean round-the-clock effort that lasted only days, agents determined that there were no further new emails, Comey’s announcement that nothing had changed in the investigation newly angered everyone—leading Trump to bang on about the system being rigged and Clinton’s team to froth that the fire drill had been a big nothingburger.

But the hits to the FBI’s reputation just kept coming in those final hours leading up to November 8: The FBI FOIA office released just days before the election a dump of documents related to the controversial pardon by Bill Clinton of Marc Rich, a case Comey himself had helped prosecute. Even though it was nothing more than an innocent piece of churning bureaucracy trying to meet an election deadline, the document release seemed as if the bureau had fully tipped over into being an active political player.

By Election Day, when Trump eked out a narrow victory, it appeared Comey had appointed himself not just Clinton’s investigator but her judge, jury and executioner as well.

Conversations with agents and FBI executives show that internal questions began to swirl soon after the holidays began; FBI agents, intensely proud of their profession and their bureau, found themselves and their boss being mocked at family dinner tables at Thanksgiving and similar gatherings. Executives began to hear grumbles as agents returned to work, complaints about the knowing smirks and raised eyebrows from relatives. Top executives in the bureau understood for the first time the depths of the perception problem on their hands—even his own workforce was beginning to question his judgment and whether Comey was still good for the FBI.

Through all of this slow unfolding mess, Comey found himself isolated within the FBI—listening to a small group of aides who didn’t serve him or the bureau’s interests well, observers say. His closest top counselor, Chuck Rosenberg, a longtime aide who had served ably at Comey’s elbow at the Justice Department earlier in the 2000s, left in mid-2015 to be the acting administrator of the DEA—leaving behind an important vacuum in Comey’s executive team that became apparent only with the passage of time. Meanwhile, his chief of staff, Jim Rybicki, was seen by other bureau executives, Justice Department leaders and White House staff as weak and generally ineffective—not, as one senior official said, the wartime consigliere Comey needed while under unprecedented fire.

Comey seemed throughout the past year to have underestimated—and misestimated—his own position, misplaying the admittedly difficult circumstances in which he found himself. In March, he said during a speech that he was proud of a tweet his daughter showed him from last summer that read, “That Comey is such a political hack. I just can’t figure out which party.” The remark struck many close to the bureau as odd: It’s hard to imagine any other FBI director ever embracing such an endorsement, let alone claim to do so publicly.

Those close to him, though, have made clear that he has few regrets about his choices during the campaign. During his testimony last week on Capitol Hill, he did say, though, that thinking that he might have changed the outcome of the election did make him “mildly nauseous.”

Yet even his attempts at damage control seemed to have the opposite impact. A lengthy New York Times article last month that outlined Comey’s thinking only served to further isolate him: Longtime Justice Department officials, both present and former, balked at an apparent effort by Comey’s camp to pass off the blame for his original July news conference to David Margolis, the legendary career prosecutor who had long served as the moral compass of Main Justice and who died in the middle of the unfolding FBI conflagration last year—meaning that Margolis, who by all accounts would have likely said just the opposite of what was attributed to him in the Times piece, was unable to tell his side of a key meeting with Comey’s camp.

Moreover, one of the few on-the-record quotes from a bureau executive, Mike Steinbach, directly contradicted the idea that Comey was operating independently—making clear that the FBI chief assumed Clinton would win.

Ever since then, it seemed Comey’s days were numbered. He was out of friends. His reasoning for actions last year increasingly appeared unsustainable. And the president of the United States was Donald Trump, a man with scant respect for the notion that you don’t fire the man in charge of an investigation that could implicate you for colluding with a foreign power.

Indeed, Comey’s firing comes as the FBI has perhaps three—or even more—separate investigations still running into last year’s campaign, and particularly any ties between the Trump campaign and Russia and that country’s interference in the U.S. election.

That means that the transition ahead will be more politically fraught than anything the FBI has seen in its history. As of Tuesday afternoon, the FBI is officially in uncharted waters. Republicans are unlikely to buck their president, and Democrats—angered as they are by his conduct during the campaign—won’t shed any tears for Comey himself, even as they decry his removal as undemocratic.

As Tim Kaine, Clinton’s vice presidential running mate, said recently, “[Comey’s actions] will go down as probably the lowest moment in the history of the FBI, probably next to the decision of J. Edgar Hoover to wiretap Martin Luther King.”

In the end, Comey stumbled into being precisely the thing he had warned against. As one FBI agent lamented to me, “We all at some point in our lives do the wrong thing for the right reasons.”