WASHINGTON — A federal judge issued a broad gag order forbidding Roger Stone to discuss his criminal case with anyone and gave him a stinging reprimand Thursday over the longtime Trump confidant's posting of a photo of the judge with what appeared to be crosshairs of a gun.

She promised to throw him behind bars if he violates the court order in any way.

U.S. District Judge Amy Berman Jackson said that it would be "foolhardy" for her not to take any action over the Instagram post and that Stone would "pose a danger" to others in the case if the conditions of his release weren't modified to include a gag order.

"Roger Stone fully understands the power of words and the power of symbols and there's nothing ambiguous about crosshairs," the judge said. "How hard was it to come up with a photo that didn't have a crosshairs in the corner?" she quipped at one point.

Stone has pleaded not guilty to charges he lied to Congress, engaged in witness tampering and obstructed a congressional investigation into possible coordination between Russia and Donald Trump's 2016 presidential campaign. The charges stem from conversations he had during the campaign about WikiLeaks, the anti-secrecy group that released material stolen from Democratic groups, including Hillary Clinton's campaign.

The political operative and self-described dirty trickster is the sixth Trump aide or adviser charged in special counsel Robert Mueller's investigation. He was arrested last month and has remained free on a $250,000 personal recognizance bond. Stone has maintained his innocence and blasted the special counsel's investigation as politically motivated.

Jose Luis Magana, Associated Press

Former campaign adviser for President Donald Trump, Roger Stone accompanied by his wife Nydia Stone, left, arrives at federal court in Washington, Thursday, Feb. 21, 2019. Stone was ordered to appear in court over a Instagram post he made about U.S. Judge Amy Berman Jackson.

During Thursday's tense and animated hearing in federal court in Washington, Stone took the witness stand to try to explain his Instagram post and apologize to the judge, repeatedly telling her he had made an egregious and inexcusable mistake.

"Thank you, but the apology rings quite hollow," she shot back before instituting the gag order.

The judge said she doubted Stone had learned his lesson and it was clear he needed "clear boundaries" about what he can and can't say to prevent potential jurors from being prejudiced.

She said she was not reassured by "the defense suggestion that Mr. Stone is all talk and no action and this is all a big mistake."

Jackson told Stone that he made "deliberate choices" to post the photo of her and created a very real risk.

"No, Mr. Stone, I am not giving you another chance," she said.

The 66-year-old Stone said the image had been selected by a volunteer who was working for him, though he couldn't say who picked the photo or list the five or six volunteers who have been working for him when he was asked by prosecutors.

He said he had several photos to choose from and posted the image himself to his profile.

"You had a choice?" the judge interjected.

Stone said he picked the photo "randomly," a suggestion the judge almost immediately dismissed.

"It was an egregious mistake. I obviously wish I could do it over again, but I cannot," Stone said. "I recognize I let the court down, I let you down, I let myself down. ... It was a momentary lapse in judgment."

He has said the photo was "misinterpreted," the symbol was actually the Celtic cross, not crosshairs of a gun, and he was not trying to threaten the judge.

Last week, Judge Jackson had implemented a limited order that prevented Stone from discussing his case near the courthouse and generally prohibited his lawyers, prosecutors and witnesses from making public comments that could "pose a substantial likelihood" of prejudicing potential jurors. But that order stopped short of imposing a broad ban on public comments, as Thursday's order does.

After Stone posted and then deleted the photo on Instagram, the judge ordered him to return to Washington and appear in court for Thursday's hearing. He and his lawyers filed a notice with the court that said they recognized the photo was "improper and should not have been posted."

Stone's lawyers argued, unsuccessfully, that placing any limits on his public comments would infringe on his constitutionally protected right to free speech.

His attorney, Bruce Rogow, said Stone's post was inexcusable but argued his client should have another chance to comply with the judge's initial gag order.

Special counsel Mueller's team has been dwindling in recent weeks and lawyers from the U.S. attorney's office in Washington were assigned to Stone's case from the beginning, which could be an indication that Mueller is planning to hand off the investigation.