WASHINGTON ― A school resource officer in Kentucky who handcuffed young children acted unreasonably and violated the children’s constitutional rights, a federal judge ruled this week.

Two children, ages 8 and 9, were handcuffed by Kevin Sumner, a school resource officer with Covington Independent Public Schools. They were cuffed behind their backs, and the cuffs were placed above their elbows because the restraints would have slipped off their wrists. Video of the handcuffing of the 8-year-old went viral after it was made public by the American Civil Liberties Union in 2015.

“Oh, God. Ow, that hurts,” the young boy said as Sumner applied the cuffs, which pulled the child’s shoulders back tightly. The officer told the boy he would “suffer the consequences” if he didn’t do as he was asked.

U.S. District Judge William Bertelsman of the Eastern District of Kentucky ruled Wednesday that the method Sumner used to handcuff the children was “unreasonable and constituted excessive force as a matter of law.” The judge wrote in a lawsuit filed by the ACLU that “the video belies” Sumner’s claim that the cuffs’ chain was as wide as the young boy’s torso and that the court had to adopt the video as fact over the word of the officer.

When the 8-year-old cried out, Bertelsman wrote, it should have been “immediately apparent that this method ... was causing pain.” But the boy was left in that position, crying and squirming, for 15 minutes.

The judge noted that a handcuffing expert had testified he did not know of any police instructor in the U.S. who would allow the elbow cuffing of children and that the defense’s own handcuffing expert conceded he had never trained law enforcement to use handcuffs above the elbow.

“While [the boy] kicked a teacher and [the girl] tried to and/or did hit a teacher, these are very young children, and their conduct does not call to mind the type of ‘assault’ which would warrant criminal prosecution,” Bertelsman wrote. “While Sumner testified that [the boy] swung his elbow towards Sumner, such can hardly be considered a serious physical threat from an unarmed, 54-pound eight-year-old child.”

The judge also found that Kenton County was liable for the officer’s actions because officials had testified that the handcuffing method was consistent with the policies of the sheriff’s office. Sumner was assigned as a school resource officer by the sheriff’s office.

Although both children had attention deficit hyperactivity disorder, the judge held that no reasonable jury could have found that they would not have been handcuffed had it not been for their ADHD. Consequently, he tossed out the claim that Sumner’s actions violated the Americans with Disabilities Act.

The Civil Rights Division of the U.S. Department of Justice, under then-President Barack Obama, had gotten involved in the lawsuit, arguing that it might not be “objectively reasonable” for a “fully grown man” to handcuff a third-grade boy. DOJ had suggested that the court consider whether the handcuffing was “punitive, rather than necessary to ensure safety,” pointing out that the officer had told the child “to behave the way you’re supposed to or you suffer the consequences.”

Claudia Center, senior staff attorney for the ACLU’s Disability Rights Program, said in a statement that they were gratified by the judge’s decision.

“We knew this was unconstitutional behavior,” Center said. “Anyone who viewed the video could see it was tantamount to torture.”

Ryan J. Reilly is HuffPost’s senior justice reporter, covering criminal justice, federal law enforcement and legal affairs. Have a tip? Reach him at ryan.reilly@huffingtonpost.com or on Signal at 202-527-9261.