US President Donald Trump has fired back at former Director of National Intelligence James Clapper, bringing up his testimony before Congress, after Clapper told CNN that Trump was unfit to be president and should resign.

“James Clapper, who famously got caught lying to Congress, is now an authority on Donald Trump. Will he show you his beautiful letter to me?” the president tweeted Thursday morning. It was not immediately clear which letter he was referring to.

James Clapper, who famously got caught lying to Congress, is now an authority on Donald Trump. Will he show you his beautiful letter to me? — Donald J. Trump (@realDonaldTrump) August 24, 2017

The “lying to Congress” part was apparently a reference to the 2013 Congressional hearing, where Senator Ron Wyden (D-Oregon) asked Clapper if the National Security Agency collected data on millions of Americans.

“No, sir ... not wittingly,” Clapper answered.

Soon thereafter, Edward Snowden’s revelations showed that the NSA did, in fact, collect data on millions of Americans.

READ MORE: Obama on Clapper's spy lie: 'He should have been more careful'

Clapper has since said he misunderstood the question and misspoke. However, Wyden said that the DNI had been given the question in advance and knew it was coming.

On Wednesday, Clapper went on CNN and blasted Trump for “divisiveness and complete intellectual, moral and ethical void,” suggesting that he is unfit to be president.

“How much longer does the country have to, to borrow a phrase, endure this nightmare?” Clapper said, adding that Trump should quit.

Russians ‘almost genetically driven to co-opt & penetrate’ - ex-intel head Clapper https://t.co/a24ktml37v — RT America (@RT_America) May 31, 2017

Toward the end of the Obama administration, Clapper led the charge by the US intelligence community that Russia interfered in the US election to help Donald Trump win. The report that he presented to the public claimed a “high degree of confidence,” but no evidence of the alleged interference.

Upon Trump’s election, Clapper made multiple appearances in the media, in which he questioning the newly elected president’s authority.

Trump had repeatedly blasted parts of the intelligence community that he believed tried to undermine his presidency. In July, he ordered Attorney General Jeff Sessions to “be much tougher on the leaks from intelligence agencies, which are leaking like rarely have they ever leaked before at a very important level.”

A new INTELLIGENCE LEAK from the Amazon Washington Post,this time against A.G. Jeff Sessions.These illegal leaks, like Comey's, must stop! — Donald J. Trump (@realDonaldTrump) July 22, 2017

Leaks from the intelligence community have plagued Trump’s White House since he took office. They included information about his conversations with world leaders, as well as counterterrorism efforts.