Updated

A federal judge on Saturday allowed the forthcoming publication of John Bolton’s memoir to go ahead next week despite concerns it contains classified information - but tore into the former national security adviser for having “gambled” with national security.

“Defendant Bolton has gambled with the national security of the United States. He has exposed his country to harm and himself to civil (and potentially criminal) liability,” Judge Royce Lamberth said in a ruling.  “But these facts do not control the motion before the Court. The government has failed to establish that an injunction will prevent irreparable harm.”

FEDERAL JUDGE WARNS DOJ THAT HORSE 'SEEMS TO BE OUT OF THE BARN' ON BLOCKING BOLTON BOOK 

The Justice Department had sought an injunction and a temporary restraining order to prevent the release of "The Room Where It Happened" on June 23, saying that the book contained classified information and that Bolton had deliberately bypassed the necessary classification review process that he had agreed to.

Defendant Bolton has gambled with the national security of the United States. He has exposed his country to harm and himself to civil (and potentially criminal) liability

— Judge Royce Lamberth

“In exchange for money, he has broken that promise,” David Morrell, deputy assistant attorney general, said in a hearing Friday. “The obligation lies on him to bring his book in line with the contractual obligations he assumed.”

But Bolton’s team has claimed that the administration is just trying to suppress embarrassing information about President Trump’s conduct.

"We are grateful that the Court  has vindicated the strong First Amendment protections against censorship and prior restraint of publication," Adam Rothberg, Simon & Schuster's senior vice president of corporate communications, said in a statement. "We are very pleased that the public will now have the opportunity to read Ambassador Bolton’s account of his time as National Security Advisor."

The book includes a number of damning claims about President Trump’s conduct in office, including that Trump pleaded with Chinese President Xi Jinping to help him win reelection, and that he said journalists should be “executed.”

Bolton wrote that after the latter comment, “This led to one of Trump’s favorite legal gambits, namely, that the Justice Department arrest the reporters, force them to serve time in jail, and then demand they disclose their sources. Only then would the leaks stop.”

Bolton’s team argued that the the book was already out in the public domain via a number of reporters who had received copies, pointing to images of reporters wielding the book already and reading from it.

BOLTON CLAIMS TRUMP SAID REPORTERS 'SHOULD BE EXECUTED' REQUESTED DOJ SEEK JAIL TIME

“The speech has been spoken, it cannot be unspoke,” his attorney Charles Cooper told the judge at Friday's hearing.

Cooper also said that the government signed off on publication, because in one email Bolton was told that the manuscript, in its latest form, did not contain classified information -- and that the form in question does not expressly say Bolton would have to wait for written permission. He accused the Trump administration of not engaging in a judicial process, but “theater” as it was urging the judge to order Bolton to do something he is unable to do.

“It’s theater, it’s to use your courtroom as a stage and to enlist you as a player as the government uses the rhetoric, the very incendiary names ... against my client, Ambassador Bolton, because at the end of the day, there is nothing Ambassador Bolton can do,” Cooper said.

But on Saturday, the judge indicated that the government's case against Bolton was ultimately likely to succeed on its merits. He said that Bolton could have sued the government, but instead sought "unilateral fast-tracking" that "carried the benefit of publicity and sales, and the cost of substantial risk exposure."

"This was Bolton’s bet: if he is right and the book does not contain classified information, he keeps the upside mentioned above; but if he is wrong, he stands to lose his profits from the book deal, exposes himself to criminal liability, and imperils national security," he said. "Bolton was wrong.”

The Justice Department argued that an injunction could stop more copies, as well as audiobooks and electronic versions, from being distributed. Judge Lamberth was not convinced by that argument and said on Saturday that "by the looks of it, the horse is not just of the barn -- it is out of the country."

"WIth hundreds of thousands of copies around the globe -- many in newsrooms -- the damage is done. There is no restoring the status quo," he said.

CLICK HERE TO GET THE FOX NEWS APP

After the ruling, President Trump hailed the ruling as a "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....Bolton broke the law and has been called out and rebuked for so doing, with a really big price to pay," he tweeted.

"He likes dropping bombs on people, and killing them," he said. "Now he will have bombs dropped on him!"

Fox News’ David Spunt, Bill Mears and Jake Gibson contributed to this report.