Former FBI Director James Comey’s testimony before a Senate panel on Thursday could have President Trump’s legal team breathing a sigh of relief since he stopped short of alleging obstruction of justice – but his otherwise scathing comments guarantee the political controversy and Russia-related investigations are far from over.

"This is nowhere near the end of our investigation," Senate Intelligence Committee Chairman Richard Burr, R-N.C., said moments after the hearing's conclusion.

Comey, in his high-profile appearance before the committee, accused the administration of defaming him and said comments made about his competency “were lies, plain and simple.”

Comey also told lawmakers he decided to document meetings he had with Trump because he was “honestly concerned that he might lie about the nature” of their discussions.

“I knew there might come a day when I might need a record of what happened not only to defend myself but to protect the FBI,” he added.

Comey also said bluntly he believes he was fired because of the Russia investigation -- and that in a now-famous February meeting, Trump directed him to ease off an investigation into former national security adviser Michael Flynn.

Trump's team denied the claims. “I can definitively say the president is not a liar,” White House Deputy Press Secretary Sarah Huckabee Sanders said.

Trump’s personal attorney Marc Kasowitz directly disputed the account of the Flynn discussion and the former FBI official’s claim that Trump demanded loyalty from him.

At the same time, Comey told lawmakers that Trump did not ask him to end the Russia investigation as a whole -- a key piece of testimony that Kasowitz seemed to flag when he said Comey affirmed Trump never sought to "impede" the probe.

“Not to my understanding, no," Comey testified, when asked by Burr whether Trump tried to get him to end the investigation. He also said he could not say whether Trump's conversations with him amounted to obstruction of justice.

Asked again if Trump engaged in obstruction of justice, Comey said, “I don’t know. That’s Bob Mueller’s job to sort that out.”

The Justice Department appointed Mueller, a former FBI director, as special counsel in mid-May to oversee the investigation into Trump’s campaign and Russia.

Comey didn't reserve his criticism just for Trump. He also took a shot at former Attorney General Loretta Lynch, revealing she had told him to describe the Clinton email probe as a "matter," not an investigation. He suggested she was trying to align the DOJ's comments with those of the Clinton campaign.

Comey had not spoken publicly since his dismissal on May 9. He was four years into a 10-year term when Trump fired him. The timing fueled claims that Trump was trying to kill the investigation into Russia and obstruct justice.

Comey was asked Thursday why he thought Trump fired him. The former FBI director said he didn’t know for sure but added, “I take the president at his word that I was fired because of the Russia investigation.” Comey was referring to an interview Trump had given NBC News in which he contradicted the narrative his aides had floated as to why Comey was let go.

Comey later added he believed he was fired to “change the way the Russia investigation was being conducted.”

Surprisingly, Comey also admitted he helped orchestrate a media leak of his private conversations with Trump because he thought that by doing so, it would put pressure on the administration and result in the appointment of a special counsel.

The public got its first glimpse of Comey's side of the story Wednesday after the Senate committee released his written statement. The seven-page statement provided details about uncomfortable conversations and silent standoffs between the former FBI director and Trump.

Comey not only laid out details about the Russia investigation but also took aim at Trump’s preoccupation with having his name publicly cleared as well as the president asking him to drop the investigation into former national security adviser Flynn.

Comey claimed the conversations became so awkward that he took steps to avoid any one-on-one time with Trump.

Comey said he spoke directly with Trump a total of nine times -- three in person and six over the phone. According to his written testimony, Comey “felt compelled” to keep a detailed log after each conversation, something he hadn’t done with former President Barack Obama.

Comey's dramatic statement detailed five separate exchanges he had with Trump, beginning with a meeting at Trump Tower in New York before Trump was sworn in as president. That briefing focused on the investigation into Russia’s election meddling as well as lascivious claims Trump had been involved with prostitutes in 2012 – a claim the White House has strongly denied.

The second meeting took place Jan. 27 at the White House. According to Comey, during a one-on-one dinner, Trump asked him if he wanted to keep his job – a question that the former FBI director found strange because in two prior conversations he had had with Trump, Comey assured him he intended to stay.

At that same dinner, Comey says Trump demanded loyalty from him.

“I need loyalty. I expect loyalty,” Comey recalled Trump saying.

During a Feb. 14 face-to-face meeting at the White House, Comey said Trump asked him to drop the FBI investigations into Flynn. Comey said the president told him: "'I hope you can see your way clear to letting this go, to letting Flynn go. He is a good guy. I hope you can let this go."