WASHINGTON — President Donald Trump’s personal attorney says the president “never, in form or substance” directed former FBI director James Comey to stop investigating anyone. That includes former national security adviser, Michael Flynn.

Marc Kasowitz, responding to Comey’s Thursday morning testimony in which the fired FBI director said Trump urged him to drop the Flynn case, also accused Comey of unauthorized disclosures of privileged communications he had with the president.

Kasowitz said there continue “to be those in government who are actively attempting to undermine this administration with selective and illegal leaks of classified information and privileged communications.”

By revealing how he gave memos summarizing his private conversations with the president to a friend, “Comey has now admitted that he is one of the leakers.”

Comey said in his testimony that he leaked his memos after a tweet by the president suggested he may have taped the conversations. He told the Senate Select Committee on Intelligence that he felt that releasing the details of his private conversations with the president might prompt the appointment of a special counsel in the case — which has occurred.

Kasowitz says Trump’s team will “leave it the appropriate authorities” to determine whether the leak should be investigated.

Kasowitz says that the president is “entitled to expect loyalty” from those serving the administration. But he says Trump never told Comey, “I need loyalty, I expect loyalty,” in form or substance, as Comey claimed.

Comey’s appearance at a public session of the committee lasted just over two hours; the committee has a closed session scheduled for later Wednesday.

After Comey’s public testimony concluded, committee Chairman Richard Burr, R-N.C., said there was more work ahead in the committee’s investigation, and that the committee plans to get together next week with the special counsel who’s leading an investigation into Russian activities during the 2016 U.S. presidential election.

In wrapping up his testimony, Comey said he believes he was fired by Trump in an effort to affect the Russia investigation. That is a “very big deal and not just because it involves me,” Comey said, adding that political considerations shouldn’t influence the FBI’s work. Comey say that if any American helped Russia in trying to influence the 2016 election, “that is a very big deal.”

Comey says he’s confident an investigation led by former FBI Director Robert Mueller, who has been appointed as special counsel, will be conducted thoroughly.

Sen. Tom Cotton, R-Ark., asked Comey if he believed the president personally colluded with Russia in its efforts to influence the U.S. presidential election.

“That’s not a question I should answer in an open setting,” Comey replied.

Earlier, Comey had said he has “no doubt” that Russia sought to intervene and influence the 2016 U.S. presidential election.

Earlier in the hearing, Comey was asked a series of questions about Russian involvement by Burr, and answered each by saying he was convinced of Russian involvement.

In opening the hearing, Burr said it was Comey’s chance to “set the record straight.” Vice Chairman Mark Warner, D-Va., in his opening remarks, had said the hearing “is not about re-litigating the election” but is being held because “Russian spies” tried to “hijack” the election.

Comey has said he had a series of uncomfortable conversations with Trump. He says Trump asked him for a pledge of loyalty and pushed him to “lift the cloud” of the Russia investigation by declaring publicly the president was not the target of the probe into his campaign’s ties with Moscow.

Warner, in his remarks, again summarized that timeline of events — the request for loyalty, and to back off on the investigation, and Comey’s firing after he refused.

The original reasons provided for the firing “didn’t pass any smell tests,” Warner said Thursday.

Comey’s remarks are first in public since he was fired May 9. He also was scheduled to meet with the committee in a closed session later Thursday.

Comey told the committee he knew of a “variety of reasons” why Attorney General Jeff Sessions’ involvement in the Russia investigation would be problematic before Sessions recused himself in March.

But Comey said during his Senate testimony the reasons are such “that I can’t discuss in an open setting.”

He said career officials in the Justice Department had been urging Sessions to step aside from the probe. Sessions did so in March, after it was revealed that he twice spoke with the Russian ambassador during the campaign.

Sessions failed to disclose those contacts when pressed by Congress during his confirmation hearing.

Comey said he doesn’t know if Comey thought Sessions had adhered to that recusal. He added that that depends on the real reason for Comey’s firing, which Sessions had recommended.

Comey’s detailed and vivid recollections of his one-on-one conversations with Trump were revealed in seven pages of prepared testimony released Wednesday. Comey opened his spoken comments by saying he did not intend to repeat them at length. Instead, Comey made brief remarks, then fielded questions.

“He had repeatedly told me I was doing a great job,” Comey said of the president.

“It confused me when I saw on television that he had actually fired me because of the Russia investigation.”

It also confused him “when I saw the original explanation” that he had been fired over his handling of a scandal involving Hillary Clinton’s private email server.

Comey also said he was distressed that after his firing, Trump had chosen to disparage the agency, and to claim he had lost the confidence of the agents who served under him.

“Those were lies, plain and simple,” Comey said.

“The FBI is honest.The FBI is strong. And the FBI is and always will be strong and independent.”

The White House had claimed after Comey’s May 9 dismissal that he had lost the confidence of rank-and-file FBI agents.

Trump claimed separately in a television interview that the FBI was “in turmoil” and hadn’t recovered.

Trump spokeswoman Sarah Huckabee Sanders — speaking as the hearing was still going on — disputed Comey’s testimony when asked about it during an off-camera briefing at the White House, saying: “I can definitely say the president’s not a liar.”

Kasowitz, a longtime Trump lawyer, was recently tapped to handle all inquiries related to the investigations into possible ties between Trump’s campaign and Russia — a move intended to distance the White House from the FBI and congressional probes.

Warner asked Comey why, at some point, he had decided that he did not want to be left alone with Trump.

Comey replied that one factor was “the nature of the person. I was honestly concerned that he might lie about the nature of our meeting.”

Comey says Trump’s behavior was new to him and led him to think, “I gotta write it down and I gotta write it down in a very detailed way.”

During the meeting, Trump asked if he personally was under investigation. Comey says he told him he was not at that time.

Referring to oft-played video of Comey walking across a room at the White House and shaking Trump’s hand, Comey offered some context.

“What he whispered in my ear was, ‘I’m really looking forward to working with you.” That’s why, Comey said, he was confused when, a few days later, Trump and he and a private dinner at which his job was again discussed. Comey said he was puzzled because they had, on three occasions, had conversations in which it was clear he was going to stay on as director.

“My common sense told me … he’s looking to get something in exchange for granting my request to stay in the job.”

In his prepared testimony, Comey had said he believed the president was trying to create a “patronage relationship” with him and described in detail an Oval Office meeting in which Trump urged him not to investigate ousted Flynn’s contacts with Russian officials.

Sen. James Risch, R-Idaho, asked Thursday if Trump ordered him to drop the matter.

“Not in his words, no. … I took it as, this is what he wants me to do.”

Then Risch asked if Comey were aware of anyone being charged with obstruction of justice because they expressed hope for a certain outcome. Comey says he wasn’t.

But, Comey added: “I took it as a direction,” and noted that the remark came during a one-on-one meeting with the president of the United States.

Asked on Thursday by Warner whether he thought Trump’s requests regarding Flynn investigation were obstruction of justice, he said it wasn’t for him to say.

“I took it as a very disturbing thing, very concerning,” Comey said.

Sen. Dianne Feinstein, D-Calif., asked Comey why he didn’t immediately object, and tell the president their conversation was inappropriate.”

“Maybe if I were stronger … Maybe if I did it again, I would do it better,” Comey said. “I was so stunned by the conversation, that I just took it in.”

He allowed that his agreeing Flynn was a “good guy” was his way of not agreeing to drop the investigation.

Under questioning by Sen. Marco Rubio, R-Fla., Comey added: “I don’t want it to sound like I was Captain Courageous.”

Comey said he did not speak to the president after April 11 — almost a month before his firing. But the president was talking about him, including a tweet about how Comey should be careful if he were to talk about their conversation — a tweet that hinted perhaps he had been secretly recording their meeting.

“I’ve seen the tweet about tapes. Lordy, I hope there are tapes,” Comey said Thursday.

Ryan Goodman, a professor at New York University School of Law, said Trump’s efforts to protect Flynn provide “strong evidence” of obstruction of justice. However, Jonathan Turley, a law professor at George Washington University, said that while Trump’s dealings with Comey were inappropriate, “We do not indict people for being boorish or clueless.”

The ex-FBI director’s testimony recounts his conversations with the apparent precision of a veteran lawman. Comey notes he had nine one-on-one interactions with Trump over a four-month stretch, compared to two private conversations with President Barack Obama between September 2013 and the end of 2016. He also says he did not keep written memos of his interactions with Obama.

The first meeting with Trump after the inauguration occurred on Jan. 27, during a private dinner at the White House that Comey came to view as an attempt by the president to “create some sort of patronage relationship.”

According to Comey, Trump asked if he wanted to remain as FBI director and declared: “I need loyalty. I expect loyalty.” Comey says he replied that he could offer his honesty, and that when Trump said he wanted “honest loyalty,” Comey paused and said, “You will get that from me.”

Comey also describes at length a Feb. 14 meeting in the Oval Office in which he believed Trump asked him to back off an investigation into Flynn.

“He then said, ‘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,'” Comey says, according to the prepared remarks. He says he believed the president was talking only about Flynn, not about the broader Russia probe.

White House spokeswoman Sanders said she was unsure if the president read Comey’s testimony after its release. Asked whether the president stood by earlier assertions that he had neither sought Comey’s loyalty nor asked for the Flynn investigation to be dropped, she said: “I can’t imagine the president not standing by his own statement.”

Warner had said in prepared testimony released early Thursday: “I do want to emphasize what is happening here — the president of the United States is asking the FBI director to drop an ongoing investigation into the president’s former National security advisor.

Trump allies raised questions about Comey’s credibility ahead of his testimony, noting that the FBI had to correct some of his remarks from his last appearance on Capitol Hill.

Comey’s prepared testimony does not full answer that question, though he does say he asked Attorney General Sessions to help prevent him having any direct communication with the president in the future.

Trump has repeatedly cast the Russia investigation as a “hoax” and denied having any improper ties to Moscow. According to Comey, Trump was acutely aware of the political toll of the investigation, complaining that the probe had left a “cloud” that was “impairing his ability to act on behalf of the country.”

In a phone call on March 30, Comey says, the president asked him what could be done to “lift the cloud.” He says Trump also volunteered that “he had nothing to do with Russia, had not been involved with hookers in Russia, and had always assumed he was being recorded when in Russia” — referencing an unverified intelligence dossier detailing compromising information Moscow had allegedly collected on Trump.

Contributing: Lynn Sweet, Scott Fornek, Stefano Esposito