WASHINGTON — Like lots of Americans, Robert Frese is not shy about expressing his views on the internet. Last year, in a comment on a newspaper’s Facebook page, he said a New Hampshire police officer who had given him a traffic citation was “a dirty cop.” The police chief, Mr. Frese added, was a coward who had covered up the matter.

The police officers might have looked the other way. They might have responded, explaining their positions and letting readers decide who was right. They might have filed a civil suit for libel, seeking money from Mr. Frese.

Instead, they did a fourth thing, one that seems at odds with the American commitment to free expression, particularly where criticism of government officials is concerned. They arrested Mr. Frese, saying he had committed criminal libel.

About half of states have laws making libel a crime, and prosecutions are not uncommon. About 25 people were charged with violating New Hampshire’s law from 2009 to 2017, according to a lawsuit filed last month on behalf of Mr. Frese by the American Civil Liberties Union. Nationwide, according to a preliminary count by Eugene Volokh, a law professor at the University of California, Los Angeles, “it appears that they happen about 20 times per year, and often lead to convictions.”