Former FBI Deputy Director Andrew McCabe accused President Trump of acting like a mob boss and releasing a "strain of insanity," according to a copy of his new book obtained by The Guardian.

McCabe alleges in the book that Trump and White House Counsel Don McGahn offered him protection in exchange for loyalty.

"The president and his men were trying to work me the way a criminal brigade would operate," he wrote.

McCabe became acting FBI director after Trump fired James Comey. He also said in the book, "The Threat: How the FBI Protects America in the Age of Terror and Trump," that Trump directed Deputy Attorney General Rod Rosenstein to write a memo to justify the firing.

Rosenstein and the White House both publicly deny that Rosenstein was directed to write the memo, but, according to McCabe, Rosenstein privately said that Trump ordered him to write it.

"He said it wasn't his idea. The president had ordered him to write the memo justifying the firing," McCabe wrote.

Then-Attorney General Jeff Sessions fired McCabe last year after a Justice Department inspector general report found that he lied about media disclosures. He denied the allegation.

The book is expected to go on sale this month.