James Comey. Screenshot/ABC News James Comey, the ousted FBI director, once wore a dark blue suit to a White House gathering to blend in with the curtains because he hoped that would help him avoid being called out by President Donald Trump, The New York Times reported Thursday.

Benjamin Wittes — a friend of Comey's, a senior fellow at the Brookings Institution, and the editor-in-chief of Lawfare — told The Times about the incident, which he said Comey described to him.

Wittes said Comey had discussed several encounters with Trump that had troubled him, including a ceremony for law-enforcement officials in the Blue Room in January, two days after Trump was inaugurated.

Comey told Wittes he did not want to go for fear of appearing too friendly with Trump. In a hearing in March, Comey announced the FBI was investigating whether the Trump campaign colluded with the Russians to sway the 2016 presidential election in Trump's favor.

But Comey still went to the event to represent the FBI, telling Wittes he hoped he could blend in with the curtains by wearing the dark blue suit and standing in the back of the room. He thought that under those conditions, Trump might not spot him and call him out.

"He thought he had gotten through and not been noticed or singled out and that he was going to get away without an individual interaction," Wittes said Comey told him.

Comey's plan failed.

Trump told those in the room that the FBI director had "become more famous" than him. Comey then walked up to Trump, who tried to hug Comey. Wittes said Comey was determined to not engage in such an embrace.

"Comey said that as he was walking across the room he was determined that there wasn't going to be a hug," Wittes said. "It was bad enough there was going to be a handshake. And Comey has long arms, so Comey said he preemptively reached out for a handshake and grabbed the president's hand. But Trump pulled him into an embrace and Comey didn't reciprocate. If you look at the video, it's one person shaking hands and another hugging."

Last week, Trump fired Comey. Earlier this week, The Times reported that Comey kept memos of his private conversations with Trump, according to sources who had seen the memos. In one, Comey reportedly wrote that Trump said he hoped he would drop an investigation into his national security adviser, Michael Flynn, who had resigned a day earlier.

Watch the interaction: