“While Bolton’s unilateral conduct raises grave national security concerns, the government has not established that an injunction is an appropriate remedy,” the judge wrote.

He said a review of passages that the government contends contain classified material had persuaded him that Mr Bolton “likely jeopardised national security through publication.”

Despite failing in the attempt to have the book halted, Mr Trump quickly took to Twitter to hail 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.”

Mr Bolton’s attorney, Charles Cooper, welcomed the judge’s ruling but disputed the finding that his client did not fully comply with his vetting obligation.

“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,” Mr Cooper said in a statement.

The book, entitled The Room Where It Happened, was widely shipped ahead of its Tuesday release date and many of its more damning allegations against Mr Trump have already been reported in the media. 

It is Mr Bolton’s portrait of 17 months up close with Mr Trump, until he was fired in September, although Mr Trump characterises the work as “fiction”.

A copy of The Room Where It Happened, by Donald Trump's former national security adviser John Bolton.

A copy of The Room Where It Happened, by Donald Trump’s former national security adviser John Bolton.

AP

Mr Bolton, a lifelong Republican who stands firmly on the right of the party, contends that Mr Trump is not “fit for office”.

He describes Mr Trump “pleading” with Chinese President Xi Jinping during trade negotiations to boost the US president’s chances of re-election in November by buying more products from US farm states.

Mr Bolton also reports that Mr Trump, a real estate tycoon who never held office before winning the White House, thought Finland was part of Russia.

‘Ukraine-like transgressions’ 

Mr Bolton, moreover, backs up the allegations at the centre of Mr Trump’s impeachment last year that he pressured Ukraine to dig up dirt to weaken his expected Democratic presidential rival Joe Biden.

Mr Trump also committed other “Ukraine-like transgressions” in his wielding of foreign policy for personal gain, Mr Bolton alleges.

In an interview to be broadcast on Sunday, Mr Bolton told ABC News Mr Trump had committed what “did feel like obstruction of justice to me” in his dealings with Turkey. 

Mr Trump was said to be receptive to Turkish President Recep Tayyip Erdogan who brought up the criminal charges against one of his country’s largest banks over violating US sanctions on Iran.

Mr Trump told Mr Erdogan that “he would take care of things”, explaining that New York prosecutors handling the case were appointed by former president Barack Obama and could be replaced, Mr Bolton writes in his book.

The sensationally blunt appraisal from someone who had such high-level access has rocked the White House, with the president already mired in criticism over his handling of the coronavirus pandemic and racial tensions.

Former national security adviser to Donald Trump, John Bolton.

Former national security adviser to Donald Trump, John Bolton.

AP

A White House statement said Mr Bolton had “likely jeopardised national security by disclosing classified information in violation of his nondisclosure agreement.”

It added that “the government intends to … ensure that he receives no profits from his shameful decision to place his desire for money and attention ahead of national security.”

The backlash over the book from Trump loyalists and the president himself has been savage. 

Mr Trump has called Mr Bolton “a sick puppy”, a “boring fool” and a “washed-up guy”.

Secretary of State Mike Pompeo branded Mr Bolton a traitor.

“John Bolton is spreading a number of lies, fully-spun half-truths and outright falsehoods,” Mr Pompeo said in a statement.