Scott Schaper wasn’t happy when he got a ticket in Olathe. He struck back by flashing the officer the finger and giving voice to the gesture.

That got him another ticket for disorderly conduct. And now it has made him $4,000 richer.

City prosecutors dropped the disorderly conduct ticket and Olathe last week agreed its insurance company would pay $4,000 to Schaper and $1,000 to his lawyers, the American Civil Liberties Union of Kansas and Western Missouri.

Yes, it turns out, people can legally use the f-word against police and also extend what the law calls the “digitus impudicus” — the impudent finger.

As part of the out-of-court settlement of Schaper’s civil rights complaint, Olathe police also must train officers to take such abuse.

Schaper, who lives in Overland Park, dished it out last September after an Olathe police officer gave him a ticket for failure to yield.

He got frustrated because he was taking his children to school and the traffic stop caused them to cry, said Doug Bonney, legal director for the local ACLU chapter.

Schaper could not be reached Thursday.

Courts nationwide have long held that when it comes to such police cases, the word and the finger express discontent or frustration and are protected by the First Amendment, Bonney said. Police departments sometimes learn that the hard way.

In words that ring as a warning, Bonney said: “This is one of my favorite cases. I love the right to cuss.”

Bonney also cites a study on flipping the bird, which some call the most common and longest-lived insult in humanity’s history. Even the ancient Greeks wrote about it.

And now Olathe policymakers will have to write about it, too.

“We will learn from it and go forward,” said Olathe city spokesman Tim Danneberg.

While people can do such things, he said, “I don’t think it makes it appropriate for them to treat anyone that way.”

Will the case lead to less civility toward Olathe police?

“I would say it’s Olathe, Kansas,” said Danneberg, meaning that most people in the city won’t behave like that.

Olathe came out far better than Pittsburgh did in a similar case settled last year.

The Pennsylvania city paid $10,000 to a citizen ticketed for giving a police officer the finger and $40,000 more to the ACLU for legal work. In that case, the citizen flipped off a Pittsburgh officer who had told him to stop giving the finger to another driver.

Prairie Village’s police chief, Wes Jordan, the outgoing president of an association of Johnson County police chiefs and the sheriff, said of such abuse: “We have to just swallow it.”

Not that they like the taste.

“It’s unfortunate there are not repercussions on certain types of behavior that do not meet society norms,” he said. “What would the citizens think if the officer flipped them off?”

While police have to take it, don’t raise your middle finger or use the f-word to a judge in a courthouse.

That can easily get you jailed for contempt.

But even in courthouses there are shades of gray.

In a landmark 1971 case, the U.S. Supreme Court ruled that a California judge could not find a man in contempt for wearing a jacket that said: “F*** the draft.”