FBI Director James Comey, with his surprise announcement Sunday that the bureau had found nothing new in the latest version of its investigation into Hillary Clinton, has now managed to infuriate both halves of the country, convincing them the nation’s premier law enforcement agency has unfairly tilted the campaign.

Comey’s entrance into the election, according to Tim Weiner, author of Enemies, the definitive history of the Federal Bureau of Investigations, has set the FBI back to the dark days of J. Edgar Hoover, when the agency operated outside the confines of Congress, the White House or the law itself.

For Weiner, too much attention has been focused on Comey’s motives for announcing publicly that the FBI had discovered new emails related to Clinton’s private email server. Instead, what matters is the outcome: chaos.

“There’s a phrase in the law, ‘knew or should have known.’ It’s pretty all-encompassing. James Comey knew or should have known what he was doing last Friday, and what the effect might be,” Weiner said in an interview that occurred before Comey re-entered the election by announcing that nothing new had been found.

“Nobody wants to go back to the days of J. Edgar Hoover. Comey has consistently said that the FBI can never go back to those dark days. But here we are. Somewhere far off, pulling wings off flies in a dark starry chamber in the sky, J. Edgar Hoover is smiling.”

Somewhere far off, pulling wings off flies in a dark starry chamber in the sky, J. Edgar Hoover is smiling.

Comey’s downfall, said Weiner (who is not related to Anthony Weiner, Huma Abedin’s estranged husband), was the same independent streak that made progressives such fans of his when he stood up to President Bush in refusing to re-authorize a secret mass surveillance program.

“Mr. Comey has a record dating back to 2004 of challenging and defying higher authorities, including President George W. Bush in the famous Stellar Wind matter, and is clearly a man who prides himself as a pillar of moral rectitude, who is willing to defy presidents and, in this case, his superiors at the justice department,” Weiner said.

The problem comes when Comey doesn’t recognize that the modern FBI is supposed to operate within constitutional limits, such as on Friday, when revelations surfaced that the FBI director had defied Justice Department protocol as well as guidance from the attorney general in updating Congress on a potential new investigation.

“If you don’t have an FBI that looks to the law and the constitution and the strictures of the Justice Department, then you are going back to the days of J. Edgar Hoover and you are putting our 240-year experiment with American democracy at risk,” he said. “The law is not what the FBI says it is. The law is what the courts and the constitution says it is.”

Bettmann via Getty Images President Richard Nixon and FBI Director J. Edgar Hoover in 1969.

Undoing the damage will take some time. “To quote Richard Nixon’s chief of staff, H.R. Haldeman, who went to prison for his own acts of political warfare, ‘once the toothpaste is out of the tube, it’s hard to get it back in,’” Weiner said. “You can’t unring that bell.”

The unprecedented role of the law enforcement agency in the election has left it a less credible arbiter if problems emerge on Election Day, he argued. “The statue of justice has a blindfold and a sword, but most importantly, a scale. This whole past week has thrown the scale out of whack. That is bad, win, lose or draw on Tuesday,” he said.

“And God help us all if the loser on Tuesday decides that he is going to defy the results, not in Florida or Ohio but in the United States in the Electoral College.”

Having studied the more than 100-year history of the bureau, Weiner said that he was surprised not to see GOP nominee Donald Trump himself pursued.

“Here’s the surprise to me, as somebody who has studied the conduct of the FBI for years,” he said. “You have a candidate in this election whose campaign manager came under investigation for some very unusual and profitable connections in a foreign country. You also have a candidate who appears, on the evidence produced by excellent reporters, to have bent the tax laws of the US to the breaking point. You have a candidate who is scheduled to stand trial in a civil racketeering case, involving a purported university, and you have a candidate who has bragged about a pattern of sexual assault. Where’s the long arm of the law there?”

The Trump campaign’s efforts at voter suppression, he said, also may merit a closer look. “You have a campaign that appears set to act in defiance of what’s left of the Voting Rights Act of 1965 on Election Day. Where’s the long arm of the law to protect the American people there?”

Comey’s problems have been long in the making. He trapped himself this summer when he decided to announce the non-findings of the Clinton investigation in a thoroughly public manner, replete with condemnations of Clinton. Having done so, he felt bound to be unusually public with the latest incremental development in October, when a new batch of emails was found on Anthony Weiner’s computer. And, presumably, he felt similarly bound on Saturday when the agency learned that nothing new had been found. Comey reportedly worried that the information about the new emails would either leak or emerge in subsequent House Republican investigations, leading people to wonder if the election would have gone to Trump if Comey had only been more forthcoming. At least now the country need not deal with that counterfactual.

Comey will have to live with results of his decision.

“Comey is a man with a record of doing what he believes is the right thing no matter what his superiors tell him, rightly or wrongly. And in this case, I surmise, he felt he was damned if he did, and damned if he didn’t,” Weiner said. “But now he’s damned.”