James Comey served as FBI director under President Donald Trump for four months before being fired on May 9, 2017.

In a new op-ed article for The New York Times, Comey describes public officials such as Attorney General William Barr and Deputy Attorney General Rod Rosenstein as getting tangled in a "web of alternative reality" created by Trump. He cited former Defense Secretary James Mattis as an exception.

"People have been asking me hard questions," Comey began. "What happened to the leaders in the Trump administration, especially the attorney general, Bill Barr, who I have said was due the benefit of the doubt?"

"Accomplished people lacking inner strength can't resist the compromises necessary to survive Mr. Trump and that adds up to something they will never recover from," he wrote. "It takes character like Mr. Mattis's to avoid the damage, because Mr. Trump eats your soul in small bites."

Visit Business Insider's homepage for more stories.

James Comey served as FBI director under President Donald Trump for four months before being fired on May 9, 2017, and in a new op-ed article for The New York Times he seems to draw from his experience in describing public officials such as Attorney General William Barr and Deputy Attorney General Rod Rosenstein as being tangled in a "web of alternative reality" created by Trump.

"People have been asking me hard questions," Comey began. "What happened to the leaders in the Trump administration, especially the attorney general, Bill Barr, who I have said was due the benefit of the doubt?"

Comey suggested the answer was complicated.

"Amoral leaders have a way of revealing the character of those around them," Comey argued. "Sometimes what they reveal is inspiring. For example, James Mattis, the former secretary of defense, resigned over principle, a concept so alien to Mr. Trump that it took days for the president to realize what had happened, before he could start lying about the man."

For others the result is more "depressing," however, Comey said, singling out Barr and Rosenstein.

"Accomplished people lacking inner strength can't resist the compromises necessary to survive Mr. Trump and that adds up to something they will never recover from," he wrote. "It takes character like Mr. Mattis's to avoid the damage, because Mr. Trump eats your soul in small bites."

Comey described a process beginning with silence — not challenging Trump's falsehoods — that progressed to "public displays of personal fealty" and then morphed into convincing oneself that despite "outrageous" behavior officials must stay to protect institutions they value.

Read more: James Comey says the Russia investigation initially focused on 4 Americans

"Of course, to stay, you must be seen as on his team, so you make further compromises," Comey concluded. "You use his language, praise his leadership, tout his commitment to values. And then you are lost. He has eaten your soul."

Comey specifically mentioned Barr's handling of the special counsel Robert Mueller's investigation.

Democratic lawmakers and others have criticized Barr over his now-disputed four-page summary of Mueller's investigation, his unconventional press conference ahead of the release of the redacted Mueller report, his Wednesday testimony before the Senate Judiciary Committee, and his recent refusal to testify before the House Judiciary Committee.

Since his ouster, Comey has testified before Congress about his interactions with the president and has been an outspoken critic of Trump. On Wednesday, CNN announced it would hold a town hall with the former FBI director.