Roger Stone, a long-time adviser to U.S. President Donald Trump, apologized repeatedly Thursday to a federal judge set to oversee his criminal trial for posting a picture on social media with what appeared to be the crosshairs of a gun target near her face.

"I don't offer any rationalization or excuse or justification. This is just a stupid lack of judgment," Stone, a self-described political trickster, told U.S. District Judge Amy Berman Jackson in Washington. "I regret it."

Stone twice posted pictures of Jackson earlier this week on Instagram, and she in turn ordered him to appear before her for an explanation.

After hearing Stone's apology, Jackson tightened the limited gag order she had already imposed on him as he awaits trial on charges that he, in coordination with Trump campaign officials in 2016, sought stolen emails from the anti-secrecy group WikiLeaks that were damaging to Trump's opponent, Democrat Hillary Clinton. Jackson ordered him to not publicly talk about the case.

At one point in the hearing, Stone said he had abused Jackson's earlier curb on talking about the case in the vicinity of the federal courthouse. He called the case "my upcoming show trial."

Stone's attorney Bruce Rogow said, "It is indefensible."

Jackson responded: "I agree with you there."

Stone was arrested at his south Florida home in a predawn FBI raid on Jan. 25. On the day he was apprehended, Stone said, "I will plead not guilty to these charges. I will defeat them in court."

Since then, Stone has made the rounds of television new shows to belittle the charges and the case against him that were brought by special counsel Robert Mueller, part of his 21-month investigation into Trump campaign links to Russia and whether Trump, as president, obstructed justice by trying to thwart the probe.

But Jackson last Friday imposed a gag order prohibiting government and defense attorneys from "making statements to the media or in public settings that pose a substantial likelihood of material prejudice to this case."

FILE - Former adviser for President Donald Trump, Roger Stone, is surrounded by protesters and supporters, some with signs and Russian flags, as he arrives at federal court in Washington, Jan. 29, 2019.

Instagram messages

On Monday, however, Stone posted messages on Instagram, saying, "Through legal trickery Deep State hitman Robert Mueller has guaranteed that my upcoming show trial is before Judge Amy Berman Jackson, an Obama appointed Judge who dismissed the Benghazi charges again Hillary Clinton and incarcerated Paul Manafort prior to his conviction for any crime…. Help me fight for my life," he wrote directing users to a website apparently set up to collect funds.

He has sent mementos to donors, small stones signed "Roger."

Several hours after posting the Instagram messages, Stone submitted the formal apology to Jackson and downplayed the symbolism of the gun target.

"Please inform the Court that the photograph and comment today was improper and should not have been posted," Stone said in a court filing signed by him and his lawyers. "I had no intention of disrespecting the Court and humbly apologize to the court for the transgression."

He later said, "A photo of Judge Jackson posted on my Instagram has been misrepresented. This was a random photo taken from the internet. Any inference that this was meant to somehow threaten the judge or disrespect court is categorically false."

He added, "What some say are crosshairs are in fact the logo of the organization that originally posted it, something called corruption central. They use the logo in many photos."