John Bolton’s memoir officially comes out Tuesday after surviving a security review and a legal challenge from the Justice Department. But over the weekend, it was available in ways even his publisher is hoping to prevent.

A PDF of “The Room Where It Happened” has turned up on the internet, offering a free, pirated edition of the former national security adviser’s scathing takedown of President Donald Trump, who has alleged that the book contains classified material that never should have been released.

“We are working assiduously to take down these clearly illegal instances of copyright infringement,” Simon & Schuster spokesperson Adam Rothberg said Sunday.

Piracy has long been a top concern among publishers, especially in the digital age, although the actual impact on sales is undetermined. “The Room Where It Happened” has been No. 1 for days on the Amazon.com bestseller list. The Associated Press was among several news outlets that obtained early copies of the book and reported on its contents.

On Saturday, a federal judge ruled that Simon & Schuster could publish the book despite the Trump administration’s contention that it compromised national security. “The Room Where It Happened” was originally scheduled for March, but was delayed twice as the White House reviewed the manuscript.

Bolton’s legal team has said that he spent months addressing White House concerns about classified information and that Bolton had been assured in late April by the official he was working with that the manuscript no longer contained any such material.

— HILLEL ITALIE, ASSOCIATED PRESS