WASHINGTON (AP) — There was a time when doing the right thing seemed pretty simple to James Comey, the FBI director whom President Donald Trump fired.
"There's right, and there's wrong and it ain't hard to tell the difference," he once said flatly.
That was before Comey lobbed a stink bomb into the 2016 presidential race just before the November election by announcing investigators had found more emails that might — or might not — relate to Hillary Clinton's use of a private email setup as secretary of state.
And it was before Comey publicly confirmed in March that the FBI since last summer had been investigating contacts between the Trump campaign and Russian officials.
Before Comey put himself at odds with Trump by contradicting presidential tweets in which Trump asserted his phones had been ordered tapped by President Barack Obama.
Before Comey confessed last week that he felt "mildly nauseous" at the thought that he might have tipped the election outcome.
Before the FBI had to correct the record on Tuesday regarding misstatements he'd made in his latest testimony on the Clinton email case.
After months of tumult and tension between Comey's FBI and the White House, Trump said he was acting to restore "public trust and confidence" in the nation's top law enforcement agency. The administration cited Comey's handling of the Clinton email investigation as justification for his dismissal.
By the time Trump cut short Comey's 10-year appointment, the FBI director who prided himself on his squeaky-clean reputation was catching criticism from all directions.
Sen. Lindsey Graham, R-S.C., said after the firing that "given the recent controversies surrounding the director, I believe a fresh start will serve the FBI and the nation well."
Democrats accused Trump of using the email scandal as a fig leaf for getting rid of the head of the FBI as it investigates possible Trump campaign connections to the Russians.
Comey has found himself in the spotlight before for standing on what the 6-foot-8 lawyer saw as the moral high ground.
Before the 2016 presidential campaign, Comey was best known for the tale of his dramatic rush to the bedside of then-Attorney General John Ashcroft in a darkened hospital room in 2004 for a standoff with senior White House officials over federal wiretapping rules. Comey, serving as acting attorney general during Ashcroft's illness, dashed to the bedside to block Bush administration officials from making an end run to get Ashcroft's permission to reauthorize a secret no-warrant wiretapping program.
"That night was probably the most difficult night of my professional life," Comey testified before Congress in 2007.
He's experienced plenty of turmoil since.
Former Justice Department officials and lawmakers from both parties called Comey's revelation about Clinton's emails just 11 days before the election an improper, astonishing and perplexing intrusion into politics in the critical endgame of the 2016 campaign.
It was an unexpected predicament for the man who had painted ethical decision-making as an easy call. But Comey's internal certitude has led the FBI official to freelance his positions at times.
In 2015, he broke from the White House in suggesting a possible link between rising homicide rates in some American cities and police officers' anxieties about taking actions that could be recorded for viral videos. The White House distanced itself from those remarks, saying there was no scientific evidence to support a connection, or to show that officers were pulling back from their responsibilities.
Comey, a former Republican who is no longer registered with a political party, spent 15 years as a federal prosecutor before serving in the George W. Bush administration. His office brought the case that led to Martha Stewart's conviction on obstruction of justice and lying to government investigators. As an assistant U.S. attorney in Virginia, he handled the investigation of the 1996 bombing of the Khobar Towers housing complex in Saudi Arabia that killed 19 members of the U.S. military.
Obama, when he nominated Comey to the FBI job in 2013, cited his willingness to stand up to power "at key moments when it's mattered most," referencing the hospital-room standoff.
But the Obama White House left Comey dangling after his much-criticized announcements regarding Clinton, saying it was up to Comey to defend himself in the face of what Obama spokesman Josh Earnest called "significant criticism from a variety of legal experts, including individuals who served in senior Department of Justice positions in administrations that were led by presidents in both parties."
Clinton last week said she was "on the way to winning" until Comey's letter and the WikiLeaks release of internal campaign emails scared off voters.
During a Senate hearing last week, Comey testified that, faced with whether to disclose the information about Clinton late in the campaign or conceal it, he had to choose between "really bad and catastrophic" and he decided to "walk into the world of really bad."
It is longstanding Justice Department protocol to avoid taking investigative action in the run-up to an election that could affect its outcome. But Comey told colleagues he felt obligated to go public after having told Congress over the summer that the investigation had been concluded without prosecution.
Christine Chung, a New York lawyer who worked with Comey when he was the top federal prosecutor in Manhattan, described him last year as ever "determined to do the right thing."
The criticism he's faced over the email disclosure, she added, is a "lesson for why good people shouldn't go to Washington."
Associated Press writer Eric Tucker contributed to this report.
Follow Nancy Benac on Twitter at: http://twitter.com.