Former FBI Director James Comey will tell a Senate panel on Thursday that President Trump demanded “loyalty” from him during a White House dinner and later asked him to deep-six an investigation into then-national security adviser Michael Flynn’s connection to a Russian ambassador, according to his opening statement.

“He is a good guy and has been through a lot,” Comey quoted Trump as saying during an Oval Office briefing on Feb. 14.

He assured Comey that Flynn, who Trump had fired the day before, had done nothing wrong in his contacts with the Russians other than misleading Vice President Pence about the meetings and concluded: “I hope you can see your way clear to letting this go, to letting Flynn go.”

Comey said he took that to mean “that we drop any investigation of Flynn in connection with false statements about his conversations with the Russian ambassador in December.”

But he said he didn’t think the president was talking about the broader FBI probe into Russia meddling in the 2016 election of whether members of Trump’s campaign colluded with Moscow.

“Regardless, it was very concerning, given the FBI’s role as an independent investigative agency,” Comey, who Trump fired in May, will tell the Senate panel.

The former FBI chief also recounted in detail the awkward moment Trump asked for a pledge of loyalty during a White House dinner on Jan. 27.

“The President said, ‘I need loyalty, I expect loyalty.’ I didn’t move, speak, or change my facial expression in any way during the awkward silence that followed. We simply looked at each other in silence,” Comey said.

He said he responded: “You will always get honesty from me.”

Trump paused for a moment, he said, then continued: “That’s what I want, honest loyalty.”

Comey said he was so unnerved by the conversation that immediately after the dinner he wrote down the comments in a memo.

“It is possible we understood the phrase ‘honest loyalty’ differently, but I decided it wouldn’t be productive to push it further. The term – honest loyalty – had helped end a very awkward conversation and my explanations had made clear what he should expect,” Comey said he wrote in the memo.

He said he also wrote notes after meeting the president-elect at the Trump Tower in January when he and other members of the intelligence community briefed him on Russian efforts to interfere in the election. He said he felt compelled to chronicle all subsequent one-on-one encounters with Trump after that.

But he said writing memos after meetings wasn’t typical, adding that he he had two private meetings with former President Obama.

“In neither of those circumstances did I memorialize the discussions,” he said.

In his opening statement, Comey also details a phone conversation he had with Trump on March 30.

Trump asked him to “lift the cloud” created by the Russia probe because it was impeding his legislative agenda.

“He said 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,” Comey said, referring to claims made in a dossier prepared by a former British intelligence officer.

“I responded that we were investigating the matter as quickly as we could, and that there would be great benefit, if we didn’t find anything, to our having done the work well. He agreed, but then re-emphasized the problems this was causing him,” Comey wrote.

His last contact with Trump came during a phone call on April 11 when the president “asked what I had done about his request that I ‘get out’ that he is not personally under investigation.”

Comey said he referred the request to the acting deputy attorney general but hadn’t heard back.

Trump said he would and added: “Because I have been very loyal to you, very loyal; we had that thing you know.”

The call ended and “that was the last time I spoke with President Trump.”

Republicans said Comey’s prepared testimony backed up Trump.

“President Trump was right,” Republican National Committee Chairwoman Ronna McDaniel said in a statement.

“Director Comey’s statement reconfirmed what the president has been saying all along — he was never under investigation.”

Democrats said it showed Trump tried to improperly enlist the FBI chief as a loyalist to help the administration politically.

“It is not the Director’s job to lift the cloud of suspicion over the President’s conduct or that of his associates. The request by the President to do so represents yet another improper effort to coerce the intelligence agencies to do public relations for the White House,” said Rep. Adam Schiff of California, the top Democrat on the House Intelligence Committee.

Additional reporting by Marisa Schultz