(CNN) In the political drama that Donald Trump has created in Washington, he could not have dreamed up a more formidable adversary than James Comey.

After the President fired his FBI director in early May, he dismissed Comey as "a showboat," "a grandstander" and a "nut job." He told Russian diplomats the next day that Comey's exit had relieved "great pressure" that he felt from the Russia investigation. He apparently assumed Comey would fade away into private life.

He was dead wrong.

Private citizen Comey emerged Thursday to crank up the heat on the Trump administration to white hot. Comey was a lucid and persuasive witness on the President's character who framed his testimony as a defense of the FBI and the institutions of government. Throughout Trump's campaign and his presidency, he has tweeted and uttered falsehoods without consequences. But before Thursday, the President had yet to be held to account for his statements by someone with the precision and authority of the former FBI director.

In damaging testimony that plainly outlined the pieces of a potential obstruction of justice inquiry, Comey directly challenged Trump's credibility by pitting it against his own. ("Lordy," he said at one point, "I hope there are tapes"). The former FBI director repeatedly accused the Commander-in-Chief of lying, and explained the elaborate steps he had taken to bolster the veracity of his own account.

JUST WATCHED Comey: I asked friend to leak memo content Replay More Videos ... MUST WATCH Comey: I asked friend to leak memo content 00:52

Trump, the supposed media and reality TV genius, won the presidency in part by dominating the 2016 news cycle and driving it in his direction. Comey's testimony about the President's apparent missteps was a stark reminder that Trump has now completely lost control of the conversation.

For nearly three hours, Comey proved himself to be a consummate inside player in this Washington drama, one with keen political instincts who was constantly thinking several steps ahead of the President -- making moves to protect himself and the independence of the FBI, and even to advance the Russia investigation after Trump ejected him.

With bluntness that was, at times, breathtaking, Comey told senators that he decided to document his conversations with Trump in detailed, contemporaneous memos because "I was honestly concerned that he might lie."

White House spokeswoman Sarah Sanders dismissed Comey's testimony during an off-camera briefing Thursday. "I can definitely say the President is not a liar, and I think it's frankly insulting that question would be asked," she said. Trump's personal attorney Marc Kasowitz said the President felt vindicated by Comey's assertion that told the President on several different occasions that he was not under investigation as part of any probe into Russian interference in the election. Kasowitz also said that the President never pressured Comey to drop the investigation of Flynn.

During his testimony, Comey described his surprise in his February 14 meeting when the President asked everyone to leave the room, including the Attorney General, before requesting that Comey lay off the investigation of his former National Security Adviser Michael Flynn.

"My impression was something big is about to happen, I need to remember every single word that is spoken," Comey said. He went on to document the conversation in an unclassified memo, so it would be accessible and available to those investigating the Russia matters.

Perhaps the clearest example of Comey's foresight was his reaction to Trump's threatening tweet on Friday, May 12, that Comey "better hope that there are no 'tapes' of our conversations before he starts leaking to the press!"

"I woke up in the middle of the night on Monday night, because it didn't dawn on me originally, that there might be corroboration for our conversations, there might be a tape," Comey told senators. He asked a friend, a professor at Columbia Law School, to share the content of his memo with a reporter.

"My judgment was I needed to get that out into the public square," Comey said. "I didn't do it myself for a variety of reasons, but I asked him to because I thought that might prompt the appointment of a special counsel." (His prediction came true. A day after The New York Times reported on the Comey memo, the Justice Department appointed former FBI Director Robert Mueller as special counsel to oversee the Russia investigation.)

Comey made it clear Thursday that he never felt the need to document his conversations with Presidents George W. Bush or Barack Obama. With Trump, he said, the "nature of the person" and the unusual circumstances in which he found himself led him to document everything.

"I knew that there might come a day when I would need a record of what had happened," Comey said. "Not just to defend myself, but to defend the FBI, and our integrity as an institution, and the independence of our investigative function."

We don't know what direction Mueller's investigation will take or whether there will ever be any accusation of wrongdoing leveled at President Trump in connection with his administration's ties to Russia.

But in the long run, his success as President will be determined by whether he can maintain the trust of the American people and his fellow Republicans in Congress.

Comey's testimony on Thursday raised considerable questions about whether he deserves that trust. And the investigation is only just beginning.