James Comey, the former FBI director, said he laughed when President Donald Trump suggested he might have to jail journalists to send a message about unauthorized leaks, a memo Comey wrote which was obtained by CNN and other news outlets on Thursday revealed.

In a memo dated February 14, 2017, Comey said that Trump complained during an Oval Office meeting about classified information being leaked to the media. Comey wrote that he said he "agreed very much" that it was "terrible" such information was being leaked, and added that he was "eager to find leakers and would like to nail one to the door as a message."

Related: Read the James Comey memos

Toward the end of their meeting, Comey said that Trump "wrapped up" the conversation "by returning to the issue of finding leakers."

"I said something about the value of putting a head on a pike as a message," Comey wrote in the memo. "[Trump] replied by saying it may involve putting reporters in jail. 'They spend a couple days in jail, make a new friend, and they are ready to talk.'"

Comey continued, "I laughed as I walked to the door Reince Priebus had opened."

The memos kept by Comey documenting his interactions with Trump are rigorous in detail and portray the president in deeply unflattering terms. Much of the information contained in the memos was already public prior to Thursday's release, but the documents are nevertheless striking to read in their entirety.

Neither a representative for Comey nor the White House immediately responded to a request for comment Friday morning.

It's unclear what the president meant when he said that after jailed journalists "make a new friend" they'd be willing to talk.

Since announcing his bid for the presidency in the summer of 2015, Trump has made his disdain for journalists known, regularly attacking reporters and news organizations that publish stories critical of him. The president has also been engrossed with learning the identities of those who have leaked to the press, publicly calling on the Department of Justice to "take action" against individuals who have done so.