A federal judge has completely barred former Trump political adviser Roger Stone from speaking publicly about his ongoing prosecution on obstruction and false statement charges, after a picture of the judge appeared on Stone’s Instagram this week with what appeared to be crosshairs in the background.

The ruling followed a hearing on Thursday in which Stone took the stand to insist he was “heartfully sorry” for the picture, which Stone said he had reviewed prior to its posting — although he suggested someone else had first selected the image.

U.S. District Court Judge Amy Berman Jackson tore into Stone during the proceeding, saying she simply didn’t believe his explanation that an unnamed “volunteer” was to blame.

“I have serious doubts about whether you learned anything at all,” Jackson said. “From this moment on, the defendant may not speak publicly about this case — period. No statements about the case on TV, radio, print reporters, or Internet. No posts on social media. [You] may not comment on the case through surrogates. You may send out emails about donating to the Roger Stone defense fund.”

Jackson added an apparent threat to revoke Stone’s bail and send him to jail: “This is not baseball. There will be no third chance. If you cannot abide by this, I will be forced to change your surroundings so you have no temptations.”

Jackson had issued a limited gag order in Stone’s case last week, preventing him from discussing the case near the courthouse. Stone was being questioned Thursday by Jackson and government lawyers as to why Jackson should not take action in response to the image.

On Thursday, Stone made the risky decision to take the stand. He denied using his phone to post the image himself, and under questioning from prosecutors and Jackson, claimed that an unnamed “volunteer” had picked the image — even though he said he accepted responsibility for the post. The image was accompanied by a caption referring to “deep state hitman Robert Mueller” and called his prosecution a “show trial.”

At one point during Thursday’s hearing, Stone’s lawyer, Bruce Rogow, called the post that featured Jackson’s image “indefensible.” Jackson replied: “I agree with you there.”

The government is asking for additional restrictions on Stone’s ability to talk about this case, while Stone’s attorneys are requesting a more detailed court order that still allows Stone to be able to retain his ability to speak publicly about the case, citing his First Amendment rights. A final ruling from Jackson could come within minutes.

“I am under enormous pressure,” Stone testified. “I now have TV people saying I will be raped if I go to jail. I’m having trouble putting food on the table and paying the rent.” (Indeed, CNN senior political analyst David Gergen pondered on air Monday if Stone — whom he called a “dandy” — would be raped in prison.)

Stone deleted the Instagram photo, but later posted the same one again, this time without the apparent crosshairs, and slammed the trial in a caption.

Former campaign adviser for President Donald Trump, Roger Stone walks out of the federal courthouse following a hearing, Friday, Jan. 25, 2019, in Fort Lauderdale, Fla. Stone was arrested Friday in the special counsel's Russia investigation and was charged with lying to Congress and obstructing the probe. (AP Photo/Lynne Sladky)

Former campaign adviser for President Donald Trump, Roger Stone walks out of the federal courthouse following a hearing, Friday, Jan. 25, 2019, in Fort Lauderdale, Fla. Stone was arrested Friday in the special counsel’s Russia investigation and was charged with lying to Congress and obstructing the probe. (AP Photo/Lynne Sladky)
(Associated Press)

In court, Stone said he “didn’t recognize it as a crosshair” and “didn’t notice” a crosshair in the image. Stone claimed a “volunteer” has selected the image, although Stone acknowledged reviewing the image before it was posted.

“This was a screwup,” Stone said. “I admit it.”

Rather than crosshairs, Stone said, he thought the image contained a “Celtic occult” symbol. But, he added, he wasn’t sure what the symbol meant, because “I’m not into the occult.”

CNN ANALYST PONDERS: WILL STONE BE SUBJECT TO RAPE IN PRISON?

Jackson reminded Stone before his testimony that he would be subject to government cross-examination and was under oath. Asked whether he understood the picture could be construed as a threat, Stone replied: “I now recognize that. … I can’t rationalize my thinking because I wasn’t thinking, and that’s my fault.”

“I am kicking myself for my own stupidity, but not more than my wife is kicking me,” Stone later told Jackson. He added that “my consulting business has dried up” and said, “I’ve exhausted my savings.”

“This is not baseball. There will be no third chance.”

— U.S. District Court Judge Amy Berman Jackson

Stone acknowledged that “the posting was my responsibility, and I regret it. This was an egregious stupid error, for which I apologize again to the court.”

Stone and his lawyers filed a notice on Monday night, admitting that sharing the picture wasn’t appropriate and that he was sorry.

Stone pleaded not guilty last month to obstruction of justice, witness tampering, and making false statements to Congress after being indicted last month as part of Special Counsel Robert Mueller’s probe, was also ordered not to travel anywhere other than Washington, the Eastern District of New York, and the Southern District of Florida while the case is pending.

Stone is not permitted to have a passport in his possession or apply for any new passport. Stone was also ordered to return to court “whenever required.”

This is a developing story. Check back soon for more updates.

Fox News’ Jake Gibson and Adam Shaw contributed to this report.