Here’s an unexpectedly long story about a handshake: An 8th grade boy who, because he is a child, is known only to court documents as P.M., refused to shake the hand of the Petrolia CISD superintendent last spring during his graduation ceremony, where he was named the junior high’s class valedictorian. In fact, P.M. downright dissed superintendent Derrith Welch at the ceremony, happily giving some skin to Principal Gary Waitman, but refusing to offer the same show of respect to Welch.

Welch responded, according to the court documents, by reaching out and grabbing P.M.’s hand. “P.M. pulled away from Welch’s grasp and walked offstage without causing any disturbance, disruption, or interference of the graduation ceremony.” The document states that, according to the boy’s mother, he and his sister both felt harrassed and singled-out by Welch throughout the school year.

Principal Waitman responded by issuing a 10-day in-school suspension for P.M., set to begin the first week of his freshman year. P.M.’s family sued, alleging that P.M.’s civil rights had been violated.

Citing the Canady vs. Bossier Parrish School System ruling from 1998, which found that it was legal for schools to enforce a uniform dress code policy if it was intended to improve educational standards, and not to stifle students’ personal expression, U.S. Magistrate Judge Robert K. Roach ruled last week in favor of Petrolia CISD and against the boy and his family:

“It was conduct, but the conduct was not coupled the communicative content under [Canady] v. Bossier City case. It was conduct voluntarily taken by P.M. not for purpose of expressing his own views or anything other than his mother’s desire to withhold respect for Mr. Welch as an individual and not in his capacity as SI. This is plain and simple disobedience counseled by P.M.’s mother for which one should expect and be willing to accept punishment and discipline.”

It appears, in other words, that the court found that the boy wasn’t communicating his own position on Welch or the work he’s done as superintendent, but was merely allowing himself to be used as a pawn in an interpersonal beef between his mom and the man who happens to serve as superintendent. In that case, the court says, it’s not communicative conduct, but just a kid disobeying an authority figure—and that sort of disobedience needs to be punished.

The court seemed mildly annoyed at the case before it: According to ABC 7 in Denver, Roach “found no legal obligation for the student to have to shake anyone’s hand,” but cited “certain social obligations” in which respect to authority is mandatory—before scolding the school for “a total and complete overreaction that could have been avoided.”

“I find that the school district has wholly failed to demonstrate that it had any reasonable apprehension that this incident caused or would cause an insurrection, wholesale disobedience, wholesale ‘dissing’ of teachers, principals and persons in authority. It was only made that way by the reaction of the school district through its principal.”

Indeed, the school’s position is kind of weird: The fact that the Principal wrote a long letter to the family alleging that the behavior was “insubordinate, disruptive, as well as premeditated” and that it would be “observed and emulated by his fellow students” because P.M. was valedictorian seems like a petty position for adults to take. But reading between the lines of both the judge’s ruling and the statements made by the school, it also seems likely that there’s some backstory involving the boy’s parents and the individuals who run the school in this town of 672.

We won’t attempt to wade through the messy interpersonal dynamics at work in a very small town, but it is worth pointing out that grabbing the hand of a boy after he has made clear that he doesn’t want to shake your hand, as the court documents allege that Welch did to P.M., is not really a great lesson to be imparting to a child in your charge about boundaries and his own bodily autonomy. The punishment for insubordination may be harsh (P.M., who made the varsity football team, will not be allowed to play the first two weeks, or to take the honors courses he qualified for, or to run for school office). And though one judge, at least, has determined that punishment just, few involved in this situation come out of it looking like an adult.