He got 30 days in jail for his letter cursing out the judge. Don’t you have a right to criticize the court?

Derrick Jenkins wrote a letter slamming a South Florida judge as “incompetent” and “unfit to serve” in a foul-mouthed letter — and spent 30 days in jail for it.

Now the 41-year-old Royal Palm Beach man is waging a free-speech fight that could decide whether all Floridians have a right to tell a judge what they can do with their (expletive) ruling.

A state appeals court panel reviewing the case on Tuesday expressed surprise that Jenkins wound up in legal trouble for telling off a judge after his case was over.

“If the case is over and a disgruntled litigant writes the judge and says, ‘Look, I think you did a lousy job, you missed these points,’ what’s wrong with that?” asked appellate Judge Dorian K. Damoorgian. “I mean, judges have to have thick skin too.”

That’s precisely what Jenkins argued after the target of his letter, Palm Beach County Circuit Judge Howard K. Coates Jr., filed the contempt charge against him.

Jenkins had blasted the judge over his decision to dismiss a $500 million civil lawsuit Jenkins filed against the Palm Beach County Sheriff’s Office. In the suit, Jenkins claimed the sheriff’s office had wasted a friend’s time over a seat belt citation.

In his typewritten letter of Jan. 25, 2019, Jenkins called Coates a “f------ hypocrit” and added that he “cant wait til the voters wake up and get rid of these f------ clowns you call judges.”

Coates said the missive included “statements and representations calculated to lessen the authority and dignity of the Court” and “impugned my reputation in the community.”

According to a court transcript, Coates told Jenkins, “You have accused me of being incompetent. That causes personal harm. But the harm goes beyond me. It goes to the judicial system as well.”

County Judge Robert Panse, who was randomly assigned to rule on the contempt case, found the letter amounted to “a clear and present danger to the orderly administration of justice.” He sentenced Jenkins to six months of probation, with the first 30 days to be spent behind bars.

After Jenkins protested, Panse explained “the bounds of speech are not limitless,” and Jenkins’ “scandalous and noxious allegations against Judge Coates” crossed a line.

That led to Jenkins’ challenge in the Fourth District Court of Appeal in West Palm Beach. Coates and Panse could not be reached Tuesday despite calls to their offices; judges typically are not permitted to discuss pending cases.

A married father of a 12-year-old daughter, Jenkins works as a night shift security guard and also cleans carpets. He was a combat soldier for the U.S. Army, who served three deployments in Iraq and Afghanistan, but now suffers from post-traumatic stress disorder and depression.

In a statement released by his attorney Greg Rosenfeld of West Palm Beach, Jenkins called the battle over his letter “a very challenging experience.”

“I’m very happy with how things went today, and I’m really hoping that my rights are vindicated,” he said.

Attorney Andrew Greenlee of Sanford, who represented Jenkins at Tuesday’s hearing, said the letter didn’t harm the justice system because the lawsuit was over when Jenkins sent it.

“The letter Mr. Jenkins sent could have and should have simply been relegated to the trash bin,” the lawyer said.

Aaron H. Caplan, a First Amendment expert and professor at Loyola Law School in Los Angeles, agreed, “All Judge Coates needed to do was take this letter and stick it in the file and not worry himself about it.”

Caplan said citizens can criticize a judge all they want, but not in a courtroom or in a court filing on a pending issue.

“As a general matter, anyone can criticize a judge, anyone can say a judge should not be re-elected, and if Mr. Jenkins had written that in a letter and published it in your newspaper, or put it up on the internet, it’s absolutely First Amendment protected,” Caplan said.

Florida Assistant Attorney General MaryEllen Farrell argued Tuesday that Jenkins lost his First Amendment rights the moment he filed his “very serious, egregious letter that makes accusations and threats against the judge.”

“Certainly when it’s filed in a court file, it’s no longer in a public arena,” Farrell argued. “That is a place where free expression and free speech is regularly and traditionally restricted. So when we’re talking about a court file there is a different standard applied.”

But the case was already over, Jenkins’ lawyer argued. He said his client sent the letter after the case was closed, so his commentary was protected by the First Amendment.

Asked Judge Martha C. Warner, for the appeals court: “Does it matter that it was an expletive-laced letter?”

No, answered Greenlee, Jenkins’ attorney: “No matter how many expletives were in there it was first and foremost political speech because he was commenting on an elected official.”

“The reasonable time, place and manner restrictions on speech that is uttered inside the court, directly to the court, don’t apply because there was no pending proceeding,” Greenlee said.

The attorney for the state argued the letter threatened Coates with an investigation and sought to have him voted off the bench.

Judge Warner said she didn’t see a problem. “That’s what you do when you’re unhappy with the judge. You say, ‘we’re going to vote him out of office,’” she said.

Another judge then asked about a particular line in the letter to Coates where Jenkins promised to “hold you personally liable as a man and you’re not immune to jack s---.”

“I don’t view that as a threat,” Greenlee said, adding the statement was unclear.

“If you look at the letter in the totality of it, it was simply a … very strongly voiced expression of displeasure at the disposition of his case,” the lawyer said. “And I think that he was within his First Amendment rights to send that letter. It’s a rough and tumble world out here and to be an elected official, a judge should, as Mr. Jenkins said, have thick skin.”

A decision by the appeals court is expected in a few months.

Marc Freeman can be reached at mjfreeman@sunsentinel.com and on Twitter @marcjfreeman.