The North Richland Hills man had been free after being arrested in March for alleged online stalking and harassment of an FBI agent who was trying to link him to a notorious computer hacker or hacking group called TheDarkOverlord.

Among the conditions of his release -- avoid posting on social media like Facebook and Twitter.

Shafer, 37, criticized the FBI agent online 12 days later -- but in a blog post. The federal probation department cited that as a reason to revoke Shafer's release. A federal magistrate agreed and ordered him to be held in custody until his trial.

Now, Shafer's attorney is trying to get him out, claiming the government unconstitutionally violated his client's Free Speech rights.

"Mr. Shafer has a First Amendment right to criticize his prosecution and rebut the accusations made against him," said his New York lawyer, Tor Ekeland, in an appeal of that judge's order.

"Mr. Shafer did not lose his free speech rights simply by being accused of a crime," Ekeland said in the motion. "If that were the case, the government could chill the speech of any critic it wanted simply by charging a crime."

Justin Shafer

(N/A)

The U.S. attorney's office in Dallas, which supported revoking Shafer's release, declined to comment.

First Amendment lawyers say judges have discretion to set a defendant's terms of release to protect the public and ensure that he doesn't flee but note that the restrictions should not be so broad that they impinge on constitutional rights.

Stephanie Lacambra, criminal defense staff attorney for the Electronic Frontier Foundation, said judges should be mindful about restrictions they place on people that could violate fundamental rights. Such limits can chill speech of public concern, she said.

"It needs to be narrowly tailored," said Lacambra, whose employer is a San Francisco-based nonprofit that defends digital privacy and free speech. "That's the kind of speech we don't want to be curtailed."

Shafer thought he was not violating U.S. Magistrate Judge Renee H. Toliver's order because he posted on his personal blog. But a legal expert in social media and cyber law said he considers a blog post to be social media.

John Browning, a Dallas lawyer who teaches social media and the law at SMU, said blogging is inherently a social activity that makes communication interactive. Blogs, he said, are intended to start a conversation.

One test is, "Are you having a conversation or just shouting into the wind?" said Browning, who has authored four books on social media.

Gag order?

Shafer was angry about being raided three different times by federal agents when he wrote the post in which he criticized the agent he's accused of harassing.

During one raid in 2016, Shafer was handcuffed and taken outside in his boxers while agents searched his North Richland Hills home, according to court filings.

"FBI is shady. Make NO mistake about it," he said on his blog post. He also said the agent who investigated him "does nothing but threaten people."

Shafer also indicated in his blog post that it was not interactive.

"No comments allowed on this blog post, and Blogger is NOT social media. It IS my first amendment right. You can take my Facebook and Twitter, but you will NOT take away my blog," he said in the post.

Excerpt from a Justin Shafer blog post about the FBI.

(N/A)

Ekeland said in his 25-page motion appealing Toliver's order that it violates Shafer's "political free speech rights."

"He simply wrote a blog post comprised of constitutionally protected speech criticizing his prosecution," Ekeland wrote. "For this he has been taken away from his wife and children."

Shafer runs a business that does computer work for dental offices. Ekeland said the conditions against his client act as a "complete bar to Mr. Shafer speaking publicly about his case."

"In a world that increasingly consumes its information from and through online sources, the conditions created a near absolute restriction on Mr. Shafer's speech and other expressive acts," Ekeland said in the motion.

Lacambra said there is precedent for the abridgment of constitutional rights after conviction, such as taking away a felon's right to vote. But she said the restrictions on Shafer appear "overbroad." Lacambra added that she could understand if a judge ordered a defendant not to contact the person they're accused of harassing.

"I think it's a little disturbing for something so fundamental to be curtailed pre-conviction," she said.

Joshua "JT" Morris, an Austin lawyer who practices in the area of First Amendment law, said controlling behavior like threats is different from controlling viewpoints. "It's a balancing act," he said.

A pretrial order that restricts criticism of the government will have a "very difficult time passing First Amendment scrutiny," he said. Given the Supreme Court's recent decision, he said, such pretrial orders have to be "a little more narrowly tailored."

Morris said he doesn't understand how accessing social media to look at family photos, for example, would affect the government's interest in stopping someone from harassing agents. He said a pre-trial order is "arguably a prior restraint on speech," which the government has a "very heavy burden to justify."

Intimidation?

Shafer is charged with cyberstalking for the alleged online harassment of the Dallas FBI agent who investigated him. The indictment also accuses him of violating a law that protects people who perform "certain official duties."

Shafer harassed the agent and his family on social media and on his websites, according to an FBI affidavit.

Shafer is accused of causing "substantial emotional distress" to the agent and his wife by making "derogatory and inflammatory statements" about the agent on Twitter and posting identifying information about his wife and other family members.

The tweets and Facebook posts in question were posted from May 2016 through March 21. Shafer included a past home address for the agent as well as Facebook profiles of his mother, cousin, wife and ex-wife. Shafer also sent a Facebook friend request to the agent's wife and messaged her on Facebook, according to the FBI.

Some of Justin Shafer's tweets about the FBI have resulted in a criminal cyberstalking charge against him in Dallas.

(N/A/Twitter)

And Shafer followed the agent's wife on Twitter "in an attempt to harass and intimidate her," the affidavit said.

Shafer calls himself a security researcher who is concerned about private health information ending up on unsecured servers that are vulnerable to hackers.

He says on his blog that he has helped dental and medical companies identify security breaches involving their patient data. Shafer said he tries to access data and then alerts companies that own the data that it is not secured. He documents his findings as well as his communications with the companies on his blog and Twitter account, sometimes posting screenshots.

However, the FBI raided his house in January 2017 and found a database of about 48,000 records on his computer that TheDarkOverlord was selling, the FBI affidavit said. Shafer said on his blog that he notified the FBI the year before that the hackers had shared their stolen records with him and he sent the bureau a copy of the database.

During that same search of his house, agents found a computer "chat session" between Shafer and TheDarkOverlord, the affidavit said.

TheDarkOverlord emerged around last June and began accessing medical records from hospitals and clinics. The group has sought ransom money for the health data as well as unreleased television shows such as Orange Is the New Black . When victims didn't pay, the hacking group released the stolen material.

TheDarkOverlord has claimed responsibility for at least 15 major computer breaches and the sale of over 1 million customer records.

CORRECTION, 7:40 p.m., Nov. 16, 2017: An earlier version of this story incorrectly reported the date when the FBI allegedly found stolen records in Shafer's house. It was in January 2017.