SEATTLE -- When a judge who helped derail President Trump’s travel ban was hit with online threats, the abuse raised safety concerns among jurists across the country, and experts are worried that the president’s own attacks on the judiciary could make judges a more inviting target.

U.S. District Judge James Robart imposed the temporary restraining order that halted enforcement of Mr. Trump’s ban last week. The president soon sent a tweet saying the opinion of “this so-called judge” was “ridiculous and will be overturned.”

The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned! — Donald J. Trump (@realDonaldTrump) February 4, 2017

Robart quickly became a target on social media. Someone on Twitter called him a “DEAD MAN WALKING” and another on Facebook suggested that he be imprisoned at the military detention center at Guantanamo Bay, “where other enemies of the US are held.”

Get Breaking News Delivered to Your Inbox

“I know there’s a fear among the judiciary with what’s being said,” said John Muffler, a former U.S. marshal who teaches security at the Reno, Nevada-based National Judicial College. He cited professional contacts and email exchanges with judges.

This still image taken from United States Courts shows Judge James Robart listening to a case at the federal courthouse in Seattle on March 12, 2013, in Seattle. United States Courts via AP

The president’s critical comments have consequences, he added, because “people on the edge can easily be pushed over the edge once the rhetoric gets going.”

Mr. Trump blasted the federal court system again Wednesday after the 9th U.S. Circuit Court of Appeals heard arguments on whether Robart’s temporary restraining order should stand. During a speech to law enforcement officials, the president said the “courts seem to be so political” and called the hearing “disgraceful.”

The next day, White House spokesman Sean Spicer said Mr. Trump had “no regrets” about his criticism of judges.

En route to his Florida retreat for the weekend, Mr. Trump suggested Friday he will act early next week to restore what he calls “extreme vetting” measures, CBS News correspondent Errol Barnett reports.

“We’ll win that battle,” the president said. “But we also have a lot of other options, including just filing a brand new order on Monday‎.”

During a joint press conference earlier in the day with Japanese Prime Minister Shinzo Abe, the president wouldn’t rule out any legal options, including an appeal to the Supreme Court.

“We will continue to go through the court process, and ultimately I have no doubt that we’ll win that particular case,” Mr. Trump said.

Threats against judges are nothing new. They often come in the form of emails, phone calls, letters and social media posts, according to court records and the U.S. Marshals Service, which is responsible for protecting the federal judiciary.

Judges are well guarded at their courthouse offices, but most do not receive protection when at home or out in the community. The Marshals Service offers extra protection if judges are threatened or handling especially sensitive or high-profile cases. All judges are also entitled to a home security system, Muffler said.

Over the past few years, marshals have responded to thousands of threats against court officials. Many are not serious, but some are more dangerous.

A Minnesota man used Twitter to threaten a federal judge overseeing a case against ISIS supporters. In Seattle, a defendant left phone messages and sent letters to two judges saying he would kill, stab, poison and bomb them because of their rulings. A white supremacist in Virginia sent electronic messages threatening to kidnap, torture, rape and kill a judge, his spouse, children and grandchildren.

Chad Schmucker, president of the Judicial College, said “assaults on judges don’t occur every day, but threats do.” He said they are usually made by “disturbed people or people who are very angry.”

“Inflammatory language,” he said, “doesn’t help the situation and can make judges very nervous.”

The marshals conducted hundreds of investigations and some prosecutions last year, according to the agency’s 2016 annual report. They declined to release data on 2017 threats.

Threatening to kill a federal judge is a Class C felony that carries a maximum penalty of 10 years in prison and a $250,000 fine.

Laurie Levenson, a professor at Loyola Law School and a former assistant U.S. attorney, said Mr. Trump’s comments about Robart were “irresponsible.”

“It’s demeaning and it’s dangerous,” she said, and “an attack on the rule of law.”

The remarks could also inspire violence, she said.

“The last thing you want to do is give a green light to someone who is misguided and thinks they’re doing a public service in attacking judges, physically or otherwise,” Levenson said.

Mr. Trump’s Supreme Court nominee, Neil Gorsuch, has described the president’s criticism of the judiciary as “demoralizing and disheartening.”

Personal attacks and threats against Robart abound on social media.

On a Facebook page about the judge, some people wrote thank-you notes to him, but others called him a disgrace, a traitor and a “bow tie wearing freak.” One man directed his note at Robart, saying he couldn’t wait “to read about the bad karma that is going to land on your weak slumping shoulders.”

One woman wrote: “Open ur home to them if anything happens to anyone in this country like 911 there (sic) blood is on your head, and I will remember to rip u one.” Another said, “who in your family is expendable Robart?”

Drew Wade, spokesman for the U.S. Marshals Service, declined to discuss the judge’s situation. The FBI also declined to comment.