The Justice Department has dropped its civil lawsuit against former National Security Adviser John Bolton over the publication of his 2020 book, "The Room Where It Happened," according to a court filing obtained by Fox News on Wednesday.

Federal prosecutors also dropped their criminal probe, according to Bolton’s representatives. Former President Donald Trump’s Justice Department sued Bolton over the book in June 2020, alleging the publication contained classified information and that Bolton had failed to complete a pre-publication review.

"We are very pleased that the Department of Justice has dismissed with prejudice its civil lawsuit against Ambassador Bolton and has terminated grand jury proceedings," Bolton’s lead attorney Charles Cooper said in a statement. "We argued from the outset that neither action was justifiable, because they were initiated only as a result of President Trump’s politically motivated order to prevent publication of the Ambassador’s book before the 2020 election."

Bolton served as Trump’s national security adviser from April 2018 to September 2019. The book contained a damning account of the Trump White House, alleging the former president once "pleaded" with Chinese President Xi Jinping to aid his re-election campaign, among other missteps.

The Trump administration attempted to stop the book’s publication. A federal judge allowed the book’s release to proceed but noted that Bolton had "likely published classified materials."

Cooper noted that Bolton’s book was published after "Ellen Knight, the National Security Council’s senior career official in charge of the NSC’s prepublication review process, personally conducted a painstaking four-month prepublication review of Ambassador Bolton’s book and, after requiring a number of revisions, concluded that it contained no classified information."

CLICK HERE TO GET THE FOX NEWS APP

"These actions represent a complete vindication for Ambassador Bolton, and a repudiation of former President Trump’s attempt, under the pretext of protecting classified information, first to suppress the book’s publication and when that failed in court, to penalize the Ambassador," Bolton spokeswoman Sarah Tinsley said in a statement.

The Associated Press and Fox News’ Bill Mears contributed to this report.