CNN  — 

A federal judge has denied the Trump administration’s attempt to block the upcoming publication of a book by former national security adviser John Bolton.

Judge Royce Lamberth of the DC District Court wrote in a 10-page decision Saturday morning that the Justice Department’s arguments weren’t enough to stop the book’s release. He cited how the book, which is scheduled to be released Tuesday, had already been widely distributed, and could easily be distributed further on the internet, even if the court said it could not be.

“For reasons that hardly need to be stated, the Court will not order a nationwide seizure and destruction of a political memoir,” Lamberth wrote.

The judge’s ruling Saturday quickly dispels a long-shot attempt by the Trump administration to stymy the book’s release – an attempt roundly condemned as antithetical to the First Amendment. But Lamberth’s decision also keeps alive major risks for Bolton, such as the administration’s effort to claw back proceeds from the book, including from any movie and TV rights, and other consequences for disclosing classified information.

Lamberth also noted Bolton could still be exposed to criminal liability.

President Donald Trump praised Lamberth on Saturday ahead of his departure for his rally in Tulsa, Oklahoma, saying the judge was “indignant at what Bolton did.”

“We had a very good decision in the John Bolton book case, and the judge was very powerful in his statements on classified information and very powerful also in the fact that the country will get the money, any money he makes,” Trump said.

“I think the judge was very smart and very indignant at what Bolton did. I think it was a great ruling. Obviously, the book was already out and leaked and everything else, but he leaked classified information, so he’s got a big problem,” he added.

In the decision Saturday, Lamberth slammed Bolton for moving the publication forward before he formally got the administration’s approval.

“He opted out of the review process before its conclusion. Unilateral fast-tracking 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,” Lamberth wrote. “Bolton was wrong.”

The court fight over Bolton’s book has turned the former national security adviser’s skirmish with Trump into a symbolic fight over freedom of speech and the press, and allowed Bolton to push for an outside referee over whether the White House’s national security decision-making was proper, or done to protect Trump politically in an election year.

Lamberth had heard from Trump administration lawyers and Bolton’s team at an almost two-hour hearing Friday, three days after the Justice Department first sued. He reviewed the executive branch’s classification descriptions in private following the public hearing.

Lamberth said the Trump administration convinced him on Friday that sensitive national security information was still included in the book. The judge didn’t make a decision at the almost two-hour hearing Friday and said he would wait to review more details from the Justice Department before deciding.

“Upon reviewing the classified materials, as well as the declarations filed on the public docket, the Court is persuaded that Defendant Bolton likely jeopardized national security by disclosing classified information in violation of his nondisclosure agreement obligations,” Lamberth wrote.

Bolton attorney Charles Cooper welcomed the ruling in a statement Saturday, but added that “we respectfully take issue, however, with the Court’s preliminary conclusion at this early stage of the case that Ambassador Bolton did not comply fully with his contractual prepublication obligation to the Government, and the case will now proceed to development of the full record on that issue.”

“The full story of these events has yet to be told – but it will be,” Cooper said in the statement.

One reviewer from the National Security Council had worked with Bolton over several sessions to remove all classified information from the book. But once she finished early this spring, other officials deemed details still in the book to be classified, and the White House told Bolton this month it wasn’t ready for publication.

Earlier on Saturday, Trump called the ruling a “BIG COURT WIN against Bolton” in a post on Twitter.

“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,” Trump said, adding: “Bolton broke the law and has been called out and rebuked for so doing, with a really big price to pay.”

In a separate statement later Saturday, the White House said that “the Government intends to hold Bolton to the further requirements of his agreements and to ensure that he receives no profits from his shameful decision to place his desire for money and attention ahead of his obligations to protect national security.”

In the book, Bolton makes stunning accusations against his former boss, claiming that Trump personally asked his Chinese counterpart, Xi Jinping, to help him win the 2020 US presidential election, and that he expressed support for China’s concentration camps, among other embarrassing foreign relations conversations.

Several news outlets including CNN obtained copies of the book this week and published articles describing and quoting Bolton’s writing. One reporter from CBS even held a copy while questioning the White House press secretary on camera.

By the time the Justice Department sued, Bolton’s publisher Simon & Schuster had already distributed 200,000 copies of the book in the US and thousands more have been distributed in the UK, Canada, Australia and India, Bolton told the court.

The CEO of Simon & Schuster came to Bolton’s defense in court this week, writing that the book’s portrayal of Trump is “of utmost public importance.”

And a spokesperson for the publishing company noted they were pleased with the ruling Saturday, saying, “We are grateful that the Court has vindicated the strong First Amendment protections against censorship and prior restraint of publication.”

The book is set to be released on June 23, and it is already believed to be a bestseller.

This story has been updated with Trump’s comments on Saturday afternoon.

CNN’s Zachary Cohen, Kaitlan Collins, Kristen Holmes, Kevin Liptak and Jason Hoffman contributed to this report.