US President Donald Trump has attacked former FBI director James Comey, describing him as a "weak and untruthful slime ball."
It comes after Mr Comey castigated Mr Trump as an unethical liar and likened him to a mob boss in a new memoir.
President Trump fired Mr Comey last May while his agency was investigating potential collusion between Trump's campaign and Russia in the 2016 US election.
The move led the US Justice Department to appoint Special Counsel Robert Mueller to take over an inquiry that has hung over his presidency.
"This president is unethical, and untethered to truth and institutional values," Mr Comey says in the book 'A Higher Loyalty: Truth, Lies and Leadership', which is due to be published on Tuesday.
Mr Trump has often publicly criticised Mr Comey since firing him, but escalated his attacks in response to the book.
"It was my great honor to fire James Comey!" Mr Trump said in one of a series of scorching Twitter messages, adding that Mr Comey - now one of the Republican president's fiercest critics - had been a terrible FBI director.
James Comey is a proven LEAKER & LIAR. Virtually everyone in Washington thought he should be fired for the terrible job he did-until he was, in fact, fired. He leaked CLASSIFIED information, for which he should be prosecuted. He lied to Congress under OATH. He is a weak and.....— Donald J. Trump (@realDonaldTrump) April 13, 2018
....untruthful slime ball who was, as time has proven, a terrible Director of the FBI. His handling of the Crooked Hillary Clinton case, and the events surrounding it, will go down as one of the worst "botch jobs" of history. It was my great honor to fire James Comey!— Donald J. Trump (@realDonaldTrump) April 13, 2018
The tirade followed news accounts of Mr Comey's book which paints a deeply unflattering picture of Mr Trump, comparing him to a mob boss who stresses personal loyalty over the law and has little regard for morality or truth.
Mr Mueller is looking into whether President Trump has sought to obstruct the Russia investigation, and Mr Comey could be a key witness on that front.
Last year Mr Comey accused Mr Trump of pressuring him to pledge loyalty and end a probe involving former national security adviser Michael Flynn's contacts with Moscow.
President Trump accused Mr Comey of lying to Congress, but did not specify what he was referring to, and said the former FBI chief should be prosecuted for leaking classified information.
Mr Trump has denied any collusion and has called Mr Mueller's inquiry a witch hunt.
Mr Comey is conducting a series of media interviews before the book's official release.
The interviews are his first public comments since he testified before the Senate Intelligence Committee last June, when he accused President Trump of firing him to undermine the FBI's Russia investigation.
Days after Mr Trump fired Mr Comey, the president said he did it because of "this Russia thing."
In an interview broadcast on ABC's Good Morning America, Mr Comey discussed his initial encounters last year with Mr Trump, who took office in January 2017.
He described the president as volatile, defensive and concerned more about his own image than about whether Russia meddled in the presidential election.
US intelligence agencies last year said Russia interfered in the election through a campaign of propaganda and hacking in a scheme to sow discord in the United States and help get Mr Trump elected.
Moscow has denied meddling.
Mr Comey said he cautioned Mr Trump against ordering an investigation into an intelligence dossier alleging a 2013 encounter involving prostitutes in Moscow.
The dossier was compiled by former British intelligence officer Christopher Steele about Mr Trump's ties to Russia.
Mr Trump denied the allegations and said he might want the FBI to investigate allegations in the dossier to prove they were untrue, Mr Comey told ABC.