In the span of just 10 days, FBI Director James B. Comey managed to irk his current boss, upset two potential future ones, enrage congressional overseers in both political parties and spark a national debate about the bureau's politicization.
So it's hardly surprising that Washington's latest parlor game is speculating about the future of the 55-year-old former prosecutor, once praised for independence and integrity but now facing calls for his resignation.
On Sunday, Comey took the extraordinary step of reaffirming his agency's July conclusion that Hillary Clinton should not be prosecuted over her handling of classified material while serving as secretary of State. That was barely a week after he rocked the 2016 presidential race by announcing that the bureau would investigate newly discovered emails possibly related to the private email server she used.
His actions, so close to Tuesday's vote, frustrated liberals and conservatives alike. Democrats said Comey should have gathered more facts about the new emails before making a public announcement; most of the emails on a computer used by Clinton aide Huma Abedin turned out to be duplicates or unrelated to the investigation. Republicans, who heralded Comey for launching the new inquiry, quickly changed course and accused him of buckling under pressure.
By alienating both sides, Comey may be able to neutralize some of the growing concerns about whether his agency is the latest Washington institution to fall victim to partisanship. But it also raises questions about what kind of relationship Comey will have with the next president, no matter who wins.
Just three years into his 10-year term, Comey, a Republican who served in President George W. Bush's Justice Department and was appointed to lead the FBI by President Obama, is believed to want to soldier on, finishing programs he put in motion to reshape the agency amid new and evolving threats.
But it's unclear whether he will enjoy the trust or support of the next president, since both Clinton and Donald Trump have at times questioned his motives and judgment.
Relations with Clinton would be particularly fraught since she would enter office as Comey's boss after being in his investigative crosshairs over her handling of classified materials, which he derided as "extremely careless" though not worthy of prosecution.
Clinton, in turn, said Comey's vague Oct. 28 missive to Congress to announce the bureau would examine the new emails was "unprecedented" and "deeply troubling."
"Honestly, the difficulty will be the shadow and ghosts of the email investigation, and they are going to come into the room every time he meets with the president," said Ronald Hosko, who worked for Comey as one of his top deputies.
Current and former FBI and Justice Department officials say it is easier to imagine what would transpire if Clinton wins Tuesday because she is a more conventional politician. She's also experienced at dealing with the law enforcement agency after numerous investigations targeted her and her husband over the years.
Trump, on the other hand, is more unpredictable. He has alternately praised and criticized Comey, most recently suggesting the FBI director is part of the "rigged system." The business mogul has also shown little respect for the Washington establishment and even suggested he might fire some of the nation's generals.
"If we are dealing with a Trump victory, all bets are off," said Benjamin Wittes, a senior fellow at the Brookings Institution
Some former law enforcement officials predict Comey might conclude it is best to resign in order to save the bureau from more withering bipartisan criticism.
"There is just too much bad blood, and he isn't going to risk putting the FBI in jeopardy by staying," said John Magaw, a former head of the Secret Service and the Transportation Security Administration.
The next president could also opt to fire the FBI director, as former President Bill Clinton did in 1993 when he dismissed William Sessions amid allegations of ethical improprieties.
But such a dramatic move usually carries significant political risk.
As a lawyer in Congress who in the 1970s helped investigate the Watergate scandal, Hillary Clinton is well-versed in what happened when President Nixon ordered the firing of a special prosecutor investigating his misdeeds. The fiasco later became known as the "Saturday Night Massacre" and helped doom Nixon's presidency.
If she fired Comey or pressured him to resign, Clinton would probably be accused of trying to interfere with the bureau's work, since the email investigation is still winding down and the FBI is also believed to be looking at allegations related to the Clinton Foundation.
Trump might be vulnerable to similar allegations since the bureau has reportedly begun to look into the connections between some of his campaign advisors and foreign officials.
Firing an FBI chief also creates a new problem: finding a politically acceptable replacement who could maintain control of a bureau that has been grappling with internal divisions, including notably over how aggressively to pursue the allegations about the Clinton Foundation.
It was Comey, after all, who stood before television cameras and Congress this summer and proclaimed that no reasonable prosecutor would file charges over what Clinton and her aides had done. In her calculus, Clinton might be better off with the FBI director she knows than the one she doesn't.
"There are legitimate criticisms of what he did," said Wittes, who describes himself as a friend of the director. "At the end of the day, he is a grown-up and a serious public servant, and he did what he thought was right. If you are Hillary Clinton, at the end of the day, are you going to swallow that?"
Comey has been struggling to get a better handle on the embarrassing friction between agents, supervisors and prosecutors over the potential investigation into the Clinton Foundation, a federal law enforcement official said.
Agents in New York have agitated to pursue an inquiry, but their bosses and prosecutors have declined to grant them the authority. The supervisors and career prosecutors felt the evidence thus far gathered by the agents was too weak to justify any intensification of the inquiry, according to two federal law enforcement officials familiar with the matter.
Such internal disputes are not uncommon, though usually remain private. The tension over the Clinton Foundation inquiry, however, erupted in public last week amid numerous leaks and a lengthy, detailed Wall Street Journal story.
U.S. law enforcement officials close to Comey say he failed to anticipate how his Oct. 28 letter would explode in the campaign. He ordered agents to conduct their review into the new emails as quickly and thoroughly as possible.
As recently as Friday, top FBI officials did not think they could complete the review before election day. But on Sunday, Comey informed lawmakers that the review had not changed his agency's conclusion that agents uncovered no evidence that Clinton intended to mishandle classified information over her private server.