A US judge has rejected a request by President Donald Trump to stop the publication of a memoir by his former National Security Adviser, John Bolton.
The justice department argued that the book had not been properly vetted.
Washington DC District Court Judge Royce Lamberth said the government had "failed to establish that an injunction would prevent irreparable harm".
Hundreds of thousands of copies of the book - The Room Where It Happened - have been printed and distributed, and are due to go on sale on Tuesday.
In the memoir Mr Bolton paints an unflattering picture of a president whose decision-making was dominated by a desire to be re-elected in November.
Mr Trump has said the book is "made up of lies and fake stories".
What did the judge's ruling say?
The justice department's lawyers argued that Mr Bolton had breached an obligation to complete a pre-publication review of his manuscript to ensure that it contained no classified information.
Mr Bolton's lawyers dismissed the claim. They insisted that the manuscript was thoroughly examined and that Mr Trump simply did not like the contents.
In his 10-page ruling, Judge Lamberth wrote that Mr Bolton had opted out of the pre-publication review process before its conclusion and that he "likely jeopardized national security by disclosing classified information in violation of his non-disclosure agreement obligations".
He nevertheless denied the government's injunction request.
"In taking it upon himself to publish his book without securing final approval from national intelligence authorities, Bolton may indeed have caused the country irreparable harm," he wrote.
"But in the internet age, even a handful of copies in circulation could irrevocably destroy confidentiality. A single dedicated individual with a book in hand could publish its contents far and wide from his local coffee shop. With hundreds of thousands of copies around the globe - many in newsrooms - the damage is done. There is no restoring the status quo."
Shortly after the decision, Mr Trump alleged on Twitter that Mr Bolton "broke the law by releasing Classified Information (in massive amounts)".
"He must pay a very big price for this, as others have before him. This should never to happen again!!!" the president added.
Later, the president called the ruling a "BIG COURT WIN against Bolton".
BIG COURT WIN against Bolton. Obviously, with the book already given out and leaked to many people and the media, nothing the highly respected Judge could have done about stopping it...BUT, strong & powerful statements & rulings on MONEY & on BREAKING CLASSIFICATION were made....— Donald J. Trump (@realDonaldTrump) June 20, 2020
A lawyer for Mr Bolton, Charles Cooper, welcomed the judge's decision to deny the injunction request.
However, he took issue with the conclusion that his client did not comply fully with his contractual pre-publication obligation to the government.
"The full story of these events has yet to be told - but it will be," he added.
Mr Bolton's publisher, Simon & Schuster, said: "We are grateful that the Court has vindicated the strong First Amendment protections against censorship and prior restraint of publication."
What is in the book?
Mr Bolton became Mr Trump's national security adviser in April 2018.
He left his post in September 2019, after disagreeing strongly with the president over how to handle major challenges like Iran, North Korea and Afghanistan.
In The Room Where It Happened, Mr Bolton portrays Mr Trump as an "erratic", "impulsive" and "stunningly uninformed" leader.
Among the allegations, which are based on private conversations and are impossible to verify, are that:
- President Trump sought help from Chinese President Xi Jinping to win the 2020 vote, stressing the "importance of farmers and increased Chinese purchases of soybeans and wheat in the electoral outcome"
- He also said China's construction of internment camps in the Xinjiang region was the "right thing to do"
- President Trump was willing to intervene in criminal investigations "to, in effect, give personal favours to dictators he liked". Mr Bolton said Mr Trump was willing to assist Turkish President Recep Tayyip Erdogan over a case involving a Turkish company
- The US leader said invading Venezuela would be "cool" and that the South American nation was "really part of the United States"
- President Trump was unaware the UK was a nuclear power and once asked a senior aide if Finland was part of Russia