Back in October 2016, Sen. Dianne Feinstein (D-CA) called then-FBI Director James Comey’s decision to look into new Hillary Clinton emails just days before the election “appalling.” Her comment reflected the general sentiment among Democrats at the time.

But in May 2017, President Donald Trump fired Comey because the FBI wouldn’t end an investigation into a former top Trump aide’s Russia ties. Democrats, almost in unison, openly warned that dismissing Comey meant Trump may have tried to obstruct justice. And after reports surfaced that Trump had called Comey a “nut job,” Feinstein herself defended the former FBI director, saying that “Comey is no way, shape, or form a nut job.”

As Comey now sits down for high-profile interview after high-profile interview — like he did on ABC on April 15 — to promote his new book, expect the good feelings from Democrats and the media alike to keep coming.

Comey’s new memoir, A Higher Loyalty, is due to come out on Tuesday. In it, highly critical of Trump, and the tome will assuredly inspire more Comey fandom on television, radio, and print. It may lead to even more arguments, like Damon Linker’s in the Week last June, “that the former FBI director is a bona fide American hero.”

But painting Comey that way misses a lot. He led the FBI when the bureau possibly mishandled its investigation into Clinton’s use of a private email server when she was secretary of state, perhaps costing Hillary Clinton the election. He was also the FBI director when he oversaw increased surveillance of Muslim communities and a culture of suspicion against Muslims and used suspect methods to stop terrorists.

Put together, as the Washington Post’s Margaret Sullivan noted on March 31, Comey is undeserving of the veneration and softball questions he will surely field in the coming days in response to his much-hyped new book. That, in part, is because he did a successful job at cultivating his holier-than-thou persona, says Matthew Miller, a top Justice Department spokesperson in the Obama administration.

“He wanted to position himself as the hero,” Miller told me, “the man of integrity who was going to tell the American people how it is — the last virgin in town.”

The problem, though, is that the media fell for it.

How Comey handled the Clinton probe

At around 11 am on July 5, 2016, then-FBI Director Comey gave a surprise televised address — thrusting him into the national spotlight.

“This will be an unusual statement in at least a couple ways,” he admitted from the FBI’s lectern. “I am going to include more detail about our process than I ordinarily would, because I think the American people deserve those details in a case of intense public interest.”

The “case” in question was the FBI’s probe into Clinton’s use of a personal email server to conduct State Department business. Investigators wanted to know if Clinton had handled classified information on an insecure network, which could make it easier for foreign adversaries to steal top secrets.

But Comey recommended no criminal charges to the Justice Department, instead reprimanding her as “extremely careless” after finding 110 emails containing classified information among the 30,000 reviewed messages.

The following day, then-Attorney General Loretta Lynch accepted Comey’s choice not to charge Clinton. (Lynch had just days before that decision met with Bill Clinton on an Arizona tarmac, leading to calls for her recusal from the case.) Comey, in effect, closed the case.

According to an April 2017 New York Times report about Comey’s actions during the election, he chose this approach for a few reasons. First, to let those people within the FBI who were upset with Clinton’s conduct know that Comey heard and understood their concerns. But second, and most importantly, he aimed to shield the bureau from GOP-led attacks that the FBI took it easy on Clinton.

Those attacks came anyway. “This announcement defies explanation. No one should be above the law,” House Speaker Paul Ryan tweeted after Comey’s remarks. “It appears damage is being done to the rule of law.”

But the more controversial moment came three months later. As part of a probe into former Rep. Anthony Weiner’s (D-NY) sexually explicit conversations with a minor, the FBI found some of Clinton’s emails on his laptop. That was no coincidence: Huma Abedin, Weiner’s wife and a close Clinton aide at the State Department, backed up thousands of emails on her husband’s computer. Some agents believed Clinton had hid emails from them, adding to suspicions that the messages on Weiner’s laptop might just be the missing emails.

And then on October 28, Comey informed Congress of what happened in a letter: “In connection with an unrelated case, the FBI has learned of the existence of emails that appear to be pertinent to the investigation.”

It was the “October surprise” many feared — the reopening of an investigation into Clinton just 11 days before the election. According to polling expert Nate Silver, Comey changed the vote’s outcome by making the probe’s restart public:

Clinton’s standing in the polls fell sharply. She’d led Trump by 5.9 percentage points in FiveThirtyEight’s popular vote projection at 12:01 a.m. on Oct. 28. A week later — after polls had time to fully reflect the letter — her lead had declined to 2.9 percentage points. That is to say, there was a shift of about 3 percentage points against Clinton. ... In the average swing state, Clinton’s lead declined from 4.5 percentage points at the start of Oct. 28 to just 1.7 percentage points on Nov. 4. If the polls were off even slightly, Trump could be headed to the White House.

Silver’s chart dramatically shows the effect the letter seemed to have on the election.

To be clear, the problem here is not that Comey’s actions helped Trump beat Clinton. It’s that his actions likely had an impact on the election. The FBI is chiefly an apolitical institution, carrying out investigations regardless of the political moment. So for Comey to act the way he did — especially at the time that he did — made it seem like he overstepped his mandate.

“The way he handled the Clinton investigation was seriously flawed and arguably a firing offense,” Miller, the former top DOJ spokesperson, told me.

Comey wrestles with his decision in the new book. “It is entirely possible that, because I was making decisions in an environment where Hillary Clinton was sure to be the next president, my concern about making her an illegitimate president by concealing the restarted investigation bore greater weight than it would have if the election appeared closer or if Donald Trump were ahead in all polls,” he writes. “But I don’t know.”

Let’s be clear about what he’s saying: Comey admits Clinton’s lead in late October may have influenced his decision to reopen the probe and let the public know about it. That means he possibly allowed politics to dictate his actions — which looks really bad for the FBI director.

But Miller thinks Comey’s view of himself also played a part. “He’s a man of integrity, but he very much believes he’s a man of integrity and often thinks he’s the only honest man in the room,” he told me. “At some point, that self-confidence crosses a line into self-righteousness.”

Comey’s imprint on the election results is bad enough. The Justice Department’s inspector general will look into, and soon adjudicate on, how the FBI handled the Clinton probe. But you also just need to look at Comey’s time running the FBI to know he’s not Mr. Perfect.

Comey wasn’t a stellar FBI director

Comey led the FBI for four years — and has faced a fair amount of criticism for his time there.

For one, Muslims working at the FBI felt their fellow agents put them under a microscope. Most notably, these employees felt the FBI would overly scrutinize them because of their heritage.

Former FBI employee Said “Sam” Barodi, according to the Guardian, detailed how some white FBI officials were openly Islamophobic, said Islam was to blame for acts of terrorism, and that some colleagues didn’t abide by the Constitution.

“I would not advise anyone to work for the FBI under these circumstances. Fuck, stay away. It is not worth it. It is cancer,” Barodi told the Guardian. “Muslim employees in federal law enforcement,” he continued, “are the target.”

But that’s not all. Comey also expanded the use of sting operations to catch would-be terrorists before they struck, and some of the practices were suspect. Last May, the Intercept reported that agents “busted” a mentally ill homeless man for claiming he had connections to ISIS. In a similar case, an informant also gave a homeless man $40 so he could buy the weapons — machetes, knives — he said he needed to carry out the attack.

Meanwhile, those stings didn’t stop actual terrorists. As the Intercept notes, the FBI looked at least twice at the man who eventually killed nearly 50 people and wounded another 50 at an Orlando nightclub in June 2016. The FBI, apparently, didn’t consider the man a threat during its investigations.

And when the FBI charged the creator of the child porn dark website Playpen last year, the bureau didn’t shut down the service. That reversed the practice Robert Mueller — Comey’s predecessor and now the special counsel looking into possible Trump-Russia ties — started. Still, the FBI made hundreds of arrests in the US and around the world throughout the case, while also identifying or rescuing nearly 300 sexually abused children.

In short, Comey wasn’t exactly an exemplary leader when he was in charge of the FBI. Yet the “Comey is a hero” myth persists — though perhaps that says more about us than him.

Why we see Comey as a hero — but shouldn’t

The impulse to lionize Comey comes from the fact that he stood up to Trump.

When Trump demanded Comey pledge his loyalty to him, the FBI director declined. After Trump fired Comey last May, Comey revealed that he kept contemporaneous notes about his interactions with the president and made parts of them public. He also testified under oath during a high-profile Senate hearing last June, in which he shockingly called the president a liar.

Put together, this makes Comey stands out as a seemingly noble figure in the middle of the whole Trump-Russia mess, where Mueller’s probe has already found that high-level Trump campaign officials committed crimes.

But if you take a second look, that’s a pretty low bar. Comey may seem like the closest thing this drama has to a hero — except for maybe Mueller himself — but that doesn’t mean the media should forget his complicated past, and treat him like one.