Roger Stone as he left federal court in Washington on Feb. 1. (Pablo Martinez Monsivais/AP)

Attorneys for Roger Stone withheld and misrepresented plans for his new book criticizing special counsel Robert S. Mueller III in violation of a gag order in his case, a federal judge found Tuesday, warning that any “costs or consequences” that result are solely his responsibility.

The new order by U.S. District Judge Amy Berman Jackson of Washington does not spell out consequences but bodes ill for the longtime friend of President Trump and Republican operative, who asked the court for leeway late Friday regarding the “imminent release” of a new version of his book about Trump’s 2016 campaign, retitled “The Myth of Russian Collusion.”

Jackson found that, in fact, Stone deliberately waited until after publication to disclose plans that had been underway for weeks, suggesting his defense was using her docket to gin up publicity for the book.

Stone attacks Mueller as “crooked” and accuses “Deep State liberals” of seeking to silence him in the book’s new introduction, despite a Feb. 21 gag order. Stone’s attorneys argued that “not a single word of the book was created” after that date. And although they had been litigating terms of a potential gag order since early February, his attorneys said it did not occur to them to tell the judge about the book before the order, by which point the book already had been online for sale for two days.

Jackson dismissed that reasoning, saying it is undisputed that her order barred all public statements by Stone about the investigation. The judge previously warned that Stone could be jailed for further violations of the gag order.

“It does not matter when the defendant may have first formulated the opinions expressed, or when he first put them into words: he may no longer share his views on these particular subjects with the world,” Jackson said in the order.

She ordered Stone’s defense to explain by next Monday how he will come into compliance. Attorneys from both sides are barred from speaking publicly about the case, and lead Stone attorney Bruce S. Rogow declined to comment.

Jackson did not demand that Stone pull the book from shelves. But she wrote that Stone’s attorneys may have waived any right to complain about his free-speech rights because they had proposed that the order in their case bar “improper” speech by Stone impugning the integrity of the court, Mueller or his prosecution.

Stone, 66, is accused of lying to Congress and obstructing justice to cover up his efforts to gather information concerning hacked Democratic Party emails during the 2016 presidential campaign. He has pleaded not guilty.

In the five-page order Tuesday, Jackson said Stone and his attorneys gave her repeated reason to question their truthfulness. They asked Friday for permission to “clarify” that the gag order did not apply to a book set for imminent release. But when asked about its release date, they said Monday that it already had been published ­online without any explanation of the “misrepresentation,” she wrote.

Stone’s defense failed to tell the court about his plans for the book or its online availability at several points in February while a gag order was being litigated, and did not describe any step to delay the book’s release, Jackson wrote.

The sequence “gives rise to the impression” that the disclosure of the book Friday, in a motion Stone’s defense purported to file “in an abundance of caution,” was actually “intended to serve as a means to generate additional publicity for the book,” Jackson said.

The fact that a gag order exists “is entirely the fault of the defendant,” Jackson said, noting that Stone initially had been told not to talk about case near the D.C. courthouse but was given the full gag order after a posting on his Instagram account depicted an image court security officials said appeared to place a gun sight’s crosshairs next to a photo of Jackson’s face.

Stone previously apologized for abusing the court’s trust and testified that what others took to be crosshairs was a Celtic cross symbol.

“Any costs or consequences that will be occasioned by the Court’s reiteration of this clear requirement at this late date are also solely attributable to the defendant, since he deliberately waited until public sales were not only ‘imminent,’ but apparently, ongoing, to inform the Court of the publication effort that had been underway for weeks,” Jackson concluded.

Given Stone’s delay in disclosing the book and “unexplained inconsistencies” in his explanations, Jackson also ordered him to disclose any records, contracts or communications with his publisher about the book’s release, and all records about the date it went on sale, when the new version was available for public viewing, and when he became aware of stages of publication and release.

Jackson also ordered Stone to disclose any public statements or social media posts, including deleted ones, by him since Jan. 15 about the book, and all steps he took or communications he had with his publisher or retailers since Feb. 21.