Former Director of National Intelligence James Clapper. REUTERS/Kevin Lamarque

Former Director of National Intelligence James Clapper said James Comey was "uneasy" about having dinner with President Donald Trump in January.

Clapper told MSNBC on Friday that Comey, the FBI director whom Trump abruptly ousted on Tuesday, had mentioned he was invited to the White House for dinner shortly after Trump's inauguration.

"He was uneasy with that because of even compromising — even the optics, the appearance of independence not only of him, but of the FBI," Clapper said.

Clapper said Comey accepted Trump's invitation out of "professional courtesy."

"You're in a difficult position to refuse to go," Clapper said of Comey. "But I do know he was uneasy with it."

During the dinner, Comey at least twice refused to pledge his loyalty to Trump and said he'd pledge his "honesty," The New York Times reported on Thursday.

Trump's abrupt dismissal of Comey has led to speculation, particularly among Democrats, that the FBI may have been closing in on compromising material while investigating Russian meddling in the 2016 election.

In a letter announcing Comey's firing, Trump said Comey assured him on three separate conversations that he wasn't under investigation. Trump reiterated that in an interview with NBC News' Lester Holt on Thursday.

The FBI and the congressional intelligence committees are investigating Russia's election interference and the Trump campaign's ties to Kremlin officials. Clapper said on Friday that he didn't know whether the Trump campaign colluded with the Russian government.

President Donald Trump and Michael Flynn, the former national security adviser. George Frey/Getty Images

Trump's first national security adviser, Michael Flynn, was asked to resign in February after revelations that he had misled Vice President Mike Pence about conversations he had with Serge Kislyak, Russia's ambassador to the US.

Clapper said he didn't think Flynn had the "skill set" to be national security adviser.

In a series of tweets on Friday morning, Trump said the Russia investigation was a "witch hunt" and that there was "no collusion" with the Russian government.

"James Comey better hope that there are no 'tapes' of our conversations before he starts leaking to the press!" Trump tweeted.

Clapper said that "morale in the FBI was very high" under Comey's leadership.

"I witnessed, personally, the very high esteem and respect people in the FBI have and still have for Jim Comey," he said.

Andrew McCabe, the acting FBI director, echoed this sentiment in his testimony before the Senate Intelligence Committee on Thursday, contradicting the White House's narrative of Comey's firing.

Watch Clapper's interview with MSNBC: