WASHINGTON — President Donald Trump fired back at Steve Bannon on Wednesday, threatening his former chief strategist with legal action and saying Bannon had "lost his mind" after being fired from the White House.

"Steve Bannon has nothing to do with me or my Presidency," Trump said in a scathing statement responding to a new book by writer Michael Wolff about the inside workings of the Trump White House.

"When he was fired, he not only lost his job, he lost his mind," the president continued about Bannon.

Trump's statement bashed Bannon for pretending "to be at war with the media, which he calls the opposition party, yet he spent his time at the White House leaking false information to the media to make himself seem far more important than he was.

"It is the only thing he does well. Steve was rarely in a one-on-one meeting with me and only pretends to have had influence to fool a few people with no access and no clue, whom he helped write phony books," Trump added.

Related: Bannon calls Trump Tower Russian meeting 'treasonous' in new book

The president attacked Bannon for backing Roy Moore in Alabama, a race that the Republican lost last month to Democrat Doug Jones. Trump also endorsed Moore.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Now that he is on his own, Steve is learning that winning isn't as easy as I make it look. Steve had very little to do with our historic victory, which was delivered by the forgotten men and women of this country...Steve doesn't represent my base — he's only in it for himself."

Late Wednesday an attorney for Trump threatened Bannon with legal action, accusing him of violating written confidentiality and non-disparagement agreements by talking to Wolff for the book. Lawyer Charles J. Harder said Bannon's actions "give rise to numerous legal claims including defamation by libel and slander." In the letter, Harder advised Bannon to stop discussing Trump or his family with any journalists, authors or bloggers.

Harder is best known as the lawyer for Terry Bollea, better known as wrestler Hulk Hogan, in a successful invasion-of-privacy suit that led to the demise of Gawker Media. He also represented Melania Trump in a defamation suit against The Daily Mail that was later settled, and Harder briefly represented disgraced Hollywood producer Harvey Weinstein in the wake of allegations he sexually harassed and assaulted numerous women.

Bannon broke his day-long silence after Trump's rebuke while hosting "Breitbart News Tonight" on SiriusXM. "The president of the United States is a great man. You know I support him day in and day out," Bannon said in response to a caller seeking to defend Bannon from Trump's attack.

Trump's harsh comments Wednesday are a 180 degree turn from his prior praise of Bannon, whom he described as a "friend of mine for a long time" during a media availability in the Rose Garden last October. "I have a very good relationship, as you know, with Steve Bannon," Trump said. "I like Steve a lot."

In the book, "Fire and Fury: Inside the Trump White House," Bannon called a meeting of Trump campaign officials with a Russian lawyer in Trump Tower during the presidential campaign "treasonous" and "unpatriotic." Bannon also said he believed that the Russians were taken after the meeting to meet Trump, something the president has denied happened.

A spokeswoman for Melania Trump also took Wolff to task over his reporting about the first lady, including that she cried — but not out of joy — on election night when her husband won the presidency.

"This book is clearly going to be sold in the bargain fiction section," Melania's spokeswoman, Stephanie Grisham, said in a statement, adding that the first lady "supported her husband's decision to run for president and in fact, encouraged him to do so."

White House Press Secretary Sarah Huckabee Sanders called the book a "trashy tabloid fiction expose" and asserted that the accounts inside it came from "individuals who have no access or influence with the White House."

However, reporters were quick to point out on Twitter that they saw Wolff coming and going into the White House for meetings on multiple occasions.

Sanders said Wolff had "roughly a dozen" interactions with White House officials, estimating that "close to 95 percent" of those meetings were done "at the request of Mr. Bannon." The White House does not disclose its visitor records, as the Obama administration did, making it difficult to verify these claims.

During Wednesday's briefing, the press secretary characterized the president's reaction as "furious" and "disgusted" by Bannon's quotes in the new book, matching what several sources close to the White House told NBC throughout the day.

The two men spoke last in the first part of December, Sanders said.

Meanwhile the president's son, Don Jr., reacted to Bannon's quotes throughout the day on Twitter, calling him an "opportunist" who "squandered" the privilege of working in the White House by turning it into "a nightmare of backstabbing, harassing, leaking, lying & undermining the President."

NBC News has not confirmed much of the book. Wolff has been accused in the past of suspect reporting, most notably in his 1998 book "Burn Rate." In its review, the defunct media review Brill's Content cited 13 people depicted in the book as saying that Wolff invented or changed quotations and that they couldn't recall his taking any notes or recording their interviews.