Roger Stone has been barred from posting on Instagram, Facebook and Twitter by a US federal judge after prosecutors said he repeatedly violated a court-imposed gag order.

US District Judge Amy Berman Jackson had imposed the order in February after Mr Stone posted a photo of the judge with what appeared to be cross hairs of a gun.

Defence lawyers said nothing Donald Trump's former adviser and self-proclaimed "dirty trickster" posted on social media ran afoul of the judge’s order or would prevent an unbiased jury from hearing the case.

"I've twice given you the benefit of the doubt. Your lawyer had to ... twist himself into a pretzel to argue that these posts didn't cross the line," the judge said. "The goal has been to draw maximum attention."

The arguments underscored how some of Mr Trump's aides charged in Special Counsel Robert Mueller’s investigation have repeatedly tested the limits of the court. While most defendants normally look to avoid the government’s ire, Mr Stone has regularly thumbed his nose at the prosecution with Instagram posts to tens of thousands of followers that denigrate the Russia investigation.

Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Show all 30 1 /30 Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Members of the Proud Boys, a fascist group, jeer at anti-Trump protesters outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter dressed as Uncle Sam poses at Uncle Sam Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A baby blimp rears its head amidst a group of anti-Trump protesters outside the president't campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam President Trump addresses supporters at the launch event of his 2020 election campaign in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Proud Boys have adopted Fred Perry polo shirts as their uniform and many members have the name of the group tattooed on their arms Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A line of police officers separate opposing groups of protesters outside the launch of President Trump's 2020 campaign launch Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A protester hits a Trump punching bag during a protest outside Trump's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Twin Trump supporters pose for a photo at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A protester dressed as a caricature of Donald Trump stands outside the president's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Trump supporter faces off against a protester outside the president's campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Proud Boy shouts across the police line at anti-Trump protesters outside the president's campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Trump supporter poses for a photo at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A Proud Boy jeers at anti-Trump protesters who are separated from the president's supporters by a police line outside the president's campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A man dressed as Uncle Sam poses at President Trump's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester faces off against a supporter outside the president's campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Members of the Proud Boys, a fascist group, jeer at anti-Trump protesters outside of the president's 2020 campaign launch Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A child holds a 2020 US "dollar bill" that features Donald Trump's face at the president's 2020 campaign launch EPA Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Anti-Trump protesters rally outside the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Anti-Trump protesters rally outside the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Numerous baby Trump balloons are raised in protests outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter wears a T-shirt depicting Trump as a hero at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam President Trump addresses supporters at the launch event of his 2020 election campaign in the Amway Centre in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester calls for the president to be impeached outside the launch event for his 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Supporters of Donald Trump face off against protesters outside of the president's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A baby blimp rises behind a group of anti-Trump protesters outside the president's campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter dressed as Uncle Sam poses at President Trump's 2020 campaign launch in Orlando, Florida AP Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A member of the Proud Boys, a fascist group, holds a sign up outside of the president's 2020 campaign launch in Orlando, Florida AFP/Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam A supporter bears a Trump flag at the president's 2020 campaign launch in Orlando, Florida Reuters Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam Protesters hold baby Trump balloons in the rally outside of the president's 2020 campaign launch in Orlando, Florida Getty Trump 2020 launch: Fascist Proud Boys, baby blimps and Uncle Sam An anti-Trump protester holds a sign accusing the president of being a traitor Getty

Another defendant, former Trump campaign chairman Paul Manafort, was jailed before trial after the same judge found that he had improperly contacted a witness in the case. And George Papadopoulos, another ex-aide, attacked the Mueller probe after his sentencing last year.

At issue Tuesday was whether the outspoken Mr Stone could be further restricted from publicly discussing the case and whether additional conditions — such as a fine — could be imposed ahead of trial. Prosecutors did not seek to have him held in contempt or jailed.

In court Tuesday, Ms Jackson went through Mr Stone’s posts one-by-one with defence lawyer Bruce Rogow to ask if he believed they ran afoul of her order. The posts included screenshots of news coverage calling into question the intelligence community’s assessment that Russia had hacked Democratic email accounts. Another post asked “Who Framed Roger Stone?” a riff on the popular 1980s film, “Who Framed Roger Rabbit.”

In each instance, Mr Rogow said the posts did not violate the order. He said the order was so broad that anything beyond saying “Hello, I’m Roger Stone,” could conceivably, and unfairly, be viewed as a violation.

“I understand how one can look at them and come to the conclusion that, yes, they were at the line or crossed the line,” Mr Rogow said. “But Mr Stone has tried to hew to the line.”

Support free-thinking journalism and attend Independent events

He said Mr Stone was using social media to communicate to others what is happening in the case “but not doing it in a way to infect or affect what the whole underlying reason is for the court order” — to ensure an impartial jury and a fair trial.

But Jackson said another, more basic question was of concern: whether Mr Stone violated her original order.