WASHINGTON • Mr James Comey came to the job as FBI director in 2013 with a reputation for fierce impartiality and a proven willingness to take on his superiors if he thought he was right.
The imposing 2m-tall former Republican is now under extraordinary pressure to explain himself after dropping a bombshell on Mrs Hillary Clinton's campaign 11 days before the presidential election.
Last Friday, Mr Comey revealed that he was reviving a previously completed investigation into Mrs Clinton's e-mail practices in a three-paragraph letter to congressional leaders that offered few specifics.
The sentence that sparked things off
WASHINGTON • This is the sentence, published last month by the Daily Mail, that led to Mrs Hillary Clinton's new FBI woes: "Anthony Weiner carried on a months-long online sexual relationship with a 15-year-old girl during which she claims he asked her to dress up in 'school-girl' outfits for him on a video messaging application and pressed her to engage in 'rape fantasies'."
By the time of that report, Mr Weiner's sexting relapse had been exposed weeks earlier by the New York Post, which published messages that the former New York congressman exchanged with a "40-something divorcee".
The New York Post story prompted Mr Weiner's wife, top Clinton aide Huma Abedin, to announce she was leaving her husband, but it did not suggest criminal behaviour.
The Daily Mail's follow-up story, however, alleged that Mr Weiner had traded sexually explicit messages with an underage girl and caught the FBI's attention.
In the process of investigating Mr Weiner, the FBI examined a computer shared by Mr Weiner and Ms Abedin and happened upon e-mails deemed relevant to the agency's earlier probe of the way Mrs Clinton and aides handled classified information.
Mr Comey reportedly informed lawmakers of the FBI's revived inquiry over the objections of Attorney-General Loretta Lynch.
He also acted despite a Justice Department policy against doing anything significant in a major investigation so close to an election if doing so could affect the results.
The actions, which have exposed him to criticism, put the focus on the University of Chicago-trained lawyer, who served as acting attorney-general in 2004 at a critical juncture in President George W. Bush's administration.
Mr Bush's White House advisers were trying to persuade the ailing Attorney-General John Ashcroft to reauthorise a warrantless surveillance programme.
Mr Comey went to Mr Ashcroft's hospital room to intercept the White House aides seeking the Attorney-General's approval.
Mr Ashcroft said he had concerns about the legality of the plan and deferred the decision to Mr Comey, who refused the request.
Mr Comey and other top Justice Department officials threatened to resign if the programme was reauthorised without their signature, and it was revised.
He was appointed by President Barack Obama as director of the Federal Bureau of Investigation with a 10-year term in office.
Now, some of Mr Comey's actions as FBI chief have left him increasingly isolated and even his supporters puzzled.
Early this year, he brought a court case seeking to compel Apple to hack into an iPhone used by a dead terrorist, saying that was law enforcement's only option in the case. The bureau later managed to buy a tool to help it get access to the phone, and the case was dropped.
In July, when the FBI investigation of Mrs Clinton was winding down, Mr Comey held an unusual press conference where he said the former secretary of state and her aides had been "extremely careless" in handling classified information, but added that "our judgment is that no reasonable prosecutor would bring such a case".
That comment went beyond what many observers expected because a final decision on whether to pursue a case is normally left to the Attorney-General.
Mr Benjamin Wittes, a senior fellow at the Brookings Institution, said: "If you're inclined to be angry with Comey over this, imagine that he had not said something and it emerged after the election that, having testified that the investigation was complete, he authorised additional investigation of a new trove of e-mails."
Ultimately, the uproar over the FBI's handling of Mrs Clinton's e-mails could affect Mr Comey's future at the agency.
FBI directors typically serve a 10-year term intended to shelter them from the changing of the guard from one presidency to the next.
But Mr Wittes said in an interview that an FBI director can be removed if a president decides to fire him or, less likely, Congress acts to impeach him.
More US election stories online at str.sg/election2016.