ALBUQUERQUE, N.M. – A state appeals court recently upheld the arrest of a student at Cleveland Middle School for interfering with the educational process by burping to entertain his classmates.

The 10th Circuit Court of Appeals ruled last Monday that the May 2011 arrest of an unnamed 13-year-old student at the school was justified under state law, and that school officials are immune from civil action for allegedly violating the boy’s rights, the Albuquerque Journal reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

School officials allege the student, identified in the lawsuit as F.M., was in a physical education class in May 2011 when the teen repeatedly faked burps to get a rise out of his classmates. The teacher sent the student into the hall, but the boy allegedly continued to look in on the class and continue to fake burp from the doorway, according to the news site.

The teacher called in school resource officer Arthur Acosta, an officer for the Albuquerque Police Department, and Acosta escorted the boy to the school office before arresting the teen for violating New Mexico’s law against disrupting schools.

The law states “No person shall willfully interfere with the educational process of any public or private school by committing or threatening to commit or inciting others to commit any act which would disrupt, impair, interfere with or obstruct the lawful mission, processes, procedures or functions of a public or private school,” the Journal reports.

Acosta searched the student, handcuffed him and hauled him to a juvenile detention center, where he was picked up by his mother about an hour later. The student was also suspended for the remainder of the school year, according to the Associated Press.

The mother claimed the student’s arrest violated his constitutional rights.

“A … suit in vindication of constitutional rights is a special legal beast. To proceed against a public official, a plaintiff needs to show that the official acted I violation of clearly established law. Almost all officials sued under section 1983 assert what is called ‘qualified immunity,’” the Journal reports. “That means if their actions were in line with what any reasonable official would have believed lawful, the suit ends.”

MORE NEWS: How to prepare for face-to-face classes

Acosta and the school argued the student’s burping in class disrupted lessons to the point that learning was no longer possible, and it was reasonable to arrest the teen for violating the law. A federal district court sided with the school, the mother appealed, and a three-judge court of appeals panel upheld the lower court’s decision 2-1.

The panel wrote that there is nothing in the law the prohibits police from arresting students for minor violations of state law, but “In his stinging dissent, Judge Neil Gorsuch pointed out that there was a precedent dating back to 1974, State v. Silva, holding that trivial interference doesn’t count as a crime, and that there must be ‘a more substantial, more physical invasion’ of school operations as well as proof that the student more ‘substantially interfered’ with the ‘actual functioning’ of the school,” the Journal reports.

The judges who ruled against the teen countered that the case cited by Gorsuch applied to colleges rather than K-12 schools, but Gorsuch pointed out that the language of the both laws are the same and should be interpreted the same.

The AP reports:

The appeals court also ruled Monday on a separate complaint brought by the boy’s mother stemming from a school official’s decision to search the boy in the November after the burp-related arrest.

Court documents show the assistant principal who suspected the teen may have been involved in a marijuana transaction asked him to remove his shoes and jeans, and flip the waistband of a pair of shorts he was wearing under his jeans. The boy was wearing several more layers of clothing under the jeans.

The search turned up a red bandanna, a belt buckle with the image of a marijuana leaf and other items but no drugs.

The mother claimed the “strip search” violated her son’s rights, but the court determined the search did not constitute a “strip search” and ruled that it was not a violation of his constitutional rights.