WASHINGTON — Former FBI Director James Comey asserted Thursday that President Donald Trump fired him to interfere with his investigation of Russia’s ties to the Trump campaign, bluntly accusing the White House of spreading “lies, plain and simple.”

Comey also revealed that he’d orchestrated the public release of information about his private conversations with the president in an effort to further the investigation.

Comey’s testimony, at a hugely anticipated congressional hearing that captured the country’s attention, provided a gripping account of his interactions with Trump and underscored the deep distrust that had soured their relationship before his stunning firing last month.

In occasionally explosive statements, Comey portrayed Trump as a chief executive dismissive of the FBI’s independence and made clear that he interpreted Trump’s request to end an investigation into his former national security adviser as an order coming from the president.

He expressed confidence that the circumstances of his firing, and Trump’s overall behavior toward him, could be investigated by special counsel Robert Mueller for possible obstruction of justice. But he declined to offer an opinion on whether it met such a threshold.

Trump’s private attorney, Marc Kasowitz, seized on Comey’s admission that he had told Trump on multiple occasions that he was not personally under investigation and maintained the testimony made clear that Trump “never, in form or substance, directed or suggested that Mr. Comey stop investigating anyone.”

Kasowitz also jumped on Comey’s revelation that he had released details of his private conversations with the president, casting the former FBI director as one of the “leakers” set on undermining the Trump administration.

Still, there’s no doubt the veteran lawman made for a challenging adversary.

“It’s my judgment that I was fired because of the Russia investigation,” Comey said toward the end of more than two hours of testimony before the Senate intelligence committee. “I was fired in some way to change, or the endeavor was to change, the way the Russia investigation was being conducted.

“That is a very big deal, and not just because it involves me.”

At one point he practically dared Trump to release any recordings of their conversations, a prospect the president once alluded to in a tweet.

“Lordy, I hope there are tapes,” Comey said, suggesting such evidence would back up his account over the president’s.

Thursday’s hearing was Comey’s first public appearance since his sudden May 9 firing and it brought Washington and other parts of the country to a standstill as Americans sat glued to their screens, harkening back to the Watergate congressional hearings that held the nation rapt some four decades earlier.

Republicans mindful of the gravity of the moment worked feverishly to lessen any damage from the hearing. They tried to undermine Comey’s credibility by issuing press releases and even ads pointing to a past instance where the FBI had to clean up the director’s testimony to Congress.

Former FBI director James Comey walks through a corridor on the way to a secure room to continue his testimony to the Senate Select Committee on Intelligence, on Capitol Hill in Washington, Thursday, June 8, 2017. Comey, who was fired by President Donald Trump, told the panel in open session that Trump repeatedly pressed him for his “loyalty” and directly pushed him to “lift the cloud” of investigation by declaring publicly the president was not the target of the probe into his campaign’s Russia ties. AP Photo/J. Scott Applewhite

In his opening statement, Comey somberly accused the Trump administration of spreading “lies, plain and simple” in the aftermath of his abrupt ouster, declaring that the administration “chose to defame me and, more importantly, the FBI” by claiming the bureau was in disorder.

He then dove into the heart of the fraught political controversy around his firing and whether Trump interfered in the bureau’s Russia investigation, as he elaborated on written testimony released a day earlier.

In that testimony, Comey said that Trump demanded his “loyalty” and directly pushed him to “lift the cloud” of investigation by declaring publicly the president was not a target of the FBI probe into his campaign’s Russia ties.

He said that when Trump told him he hoped he would terminate an investigation into Michael Flynn, the ousted national security adviser, he interpreted that as a directive.

“I mean, this is the president of the United States, with me alone, saying, ‘I hope’ this,” he said. “I took it as, this is what he wants me to do.”

Asked whether that February Oval Office discussion amounted to obstruction of justice, Comey said he expected that to be a matter for Mueller, the former FBI director who has taken over the Justice Department’s investigation.

“I’m sure the special counsel will work towards, to try and understand what the intention was there, and whether that’s an offense,” he said.

In a startling disclosure, Comey revealed that after his firing he actually tried to spur the special counsel’s appointment by giving a damning memo he had written about a meeting with Trump to a friend to release to the media.

“My judgment was I need to get that out into the public square,” Comey said.

The February meeting was one of several one-on-one encounters that Comey said made him feel such intense discomfort that he felt compelled to document them in memos.

“I was honestly concerned that he might lie about the nature of our meeting, so I thought it really important to document,” Comey said. “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.”

Trump himself was expected to dispute Comey’s claims that the president demanded loyalty and asked the FBI director to drop the investigation into Flynn, according to a person close to the president’s legal team who demanded anonymity because they were not authorized to discuss legal strategy. Instead, Kasowitz pushed back and the president remained conspicuously silent on Twitter during the hearing despite expectations he might respond.

The disclosures that followed Comey’s firing have raised questions about why Comey, known in government for an independent streak and a willingness to buck protocol, did not speak out publicly while on the job, or at least make his objections directly known to the president.

Discussing the meeting where Comey says Trump asked him to back off Flynn, Sen. Dianne Feinstein of California asked: “Why didn’t you stop and say, ‘Mr. President, this is wrong,’?”

“That’s a great question,” Comey replied. “Maybe if I were stronger I would have. I was so stunned by the conversation I just took it in.”

Comey also made clear that political entanglement in law enforcement has cut across party lines.

During a discussion of the Hillary Clinton email investigation, Comey disclosed that then-Attorney General Loretta Lynch, an Obama administration appointee, instructed him to refer to the issue as a “matter,” not an “investigation.”

“That concerned me because that language tracked how the campaign was talking about the FBI’s work and that’s concerning,” Comey said. “We had an investigation open at the time so that gave me a queasy feeling.”

Many Democrats still blame Comey for Clinton’s loss, leading Trump to apparently believe they would applaud him for firing Comey. The opposite occurred, as the firing created a political firestorm that has stalled Trump’s legislative agenda and taken over Washington.

Under questioning Thursday, Comey reaffirmed the intelligence community’s conclusion that Russia meddled in the election.

“There should be no fuzz on this. The Russians interfered,” Comey stated firmly. “That happened. It’s about as unfake as you can possibly get.”

Trump has begrudgingly accepted that assessment. But he has also suggested he doesn’t believe it, saying Russia is a “ruse” and calling the investigation into the matter a “witch hunt.”