The Trump administration filed a lawsuit Tuesday seeking to prevent publication of former national security advisor John Bolton's book, which is expected to provide a damning insider portrait of the White House.

The Department of Justice alleged in its suit, filed in federal court in Washington, that publication of the book risks "compromising national security" through revelation of classified information that Bolton had access to during his turbulent 17-month stint in the White House.

The suit says Bolton failed to have the text vetted, meaning his book would be in "clear breach of agreements he signed as a condition of his employment and as a condition of gaining access to highly classified information."

The book, "The Room Where It Happened: A White House Memoir," is due to hit the shelves next Tuesday.

John Bolton was a top advisor to President Donald Trump but now they're locked in a court battle over an upcoming memoir
John Bolton was a top advisor to President Donald Trump but now they're locked in a court battle over an upcoming memoir AFP / Logan Cyrus

Bolton, a veteran Washington insider and a controversial conservative hawk, was a close advisor to President Donald Trump.

He is believed to have taken meticulous notes during his various meetings with Trump and other senior personnel.

After the two had a public falling out, Bolton in January threatened to become a prime witness against Trump in the US leader's Senate impeachment trial, but only if the Senate issued a subpoena for his testimony.

The administration pressured the chamber's Republican majority, and the opposition Democrats fell short of the necessary votes to issue a subpoena compelling Bolton to testify.

John Bolton (L), a veteran Washington insider and fierce conservative hawk, was once a close advisor to President Donald Trump
John Bolton (L), a veteran Washington insider and fierce conservative hawk, was once a close advisor to President Donald Trump AFP / Brendan Smialowski

Bolton left in September after disagreeing with Trump's diplomatic outreach to adversaries, notably North Korea and Afghanistan's Taliban. Since then the two have become openly hostile and Bolton's book has been touted as a tell-all from the Oval Office.

"This is the book Donald Trump doesn't want you to read," teased publishers Simon and Schuster.

In particular, Bolton alleges that Trump committed a host of impeachable offenses beyond pressuring Ukraine to investigate his political rival, Democrat Joe Biden.

John Bolton (R), here with President Trump in April 2018, is believed to have taken meticulous notes during his time at the White House
John Bolton (R), here with President Trump in April 2018, is believed to have taken meticulous notes during his time at the White House AFP / NICHOLAS KAMM

Bolton, in the book's epilogue, also accuses Trump of seizing Bolton's advisors' documents, obstructing his Twitter account and "making outright threats of censorship," according to Axios.

The government says Bolton is in breach of basic secrecy rules after refusing to wait for the National Security Council to go through the text, as required.

The NSC found "significant quantities of classified information that it asked Defendant to remove," the court docket said, but the "Defendant apparently became dissatisfied at the pace of NSC's review."

It said Bolton and publishers reportedly resolved to release the book on June 23 "without Defendant giving any prior notice to the NSC" or completing the pre-publication review process.

"Simply put, Defendant struck a bargain with the United States as a condition of his employment in one of the most sensitive and important national security positions in the United States Government and now wants to renege on that bargain."

In a brief statement, Simon & Schuster said that leading up to the book's publication Bolton "worked in cooperation with the National Security Council to incorporate changes to the text that addressed NSC concerns."

The final, published version "reflects those changes, and Simon & Schuster is fully supportive of Ambassador Bolton's First Amendment right to tell the story of his time in the Trump White House."

The mustachioed 71-year-old on Tuesday retweeted statements by rights groups including by the American Civil Liberties Union, which pointed to a similar effort 50 years ago by the Nixon administration to suppress The Pentagon Papers that was rejected by the Supreme Court.

"Any Trump administration efforts to stop John Bolton's book from being published are doomed to fail," the ACLU stated.

Bolton has already sat down with some US news networks for interviews to be aired ahead of the publication date.