Four current and former students at a Maryland high school have sued Omnilert, Baltimore County police, the school board, individual officers and the school principal over an incident in which police detained them after an AI system mistook a bag of Doritos for a gun.

The lawsuit, filed a year after the incident, alleges unlawful detention and search caused by technological and human errors. The students say they were handcuffed and searched by armed officers while waiting for rides home after football practice, and that the experience left them fearing for their lives.

According to the complaint, the incident happened on the evening of 20 October, after practice. Coach handed out bags of Doritos, and Taki Allen, a junior at the time, took several. He and friends were waiting near picnic tables when six police cruisers arrived with lights flashing. The complaint says officers drew their weapons and the students raised their hands.

The complaint says the students “were in shock and feared for their lives after being stopped, ordered to their knees, handcuffed and searched”. It alleges that Omnilert’s AI gun-detection system flagged the chips bag as a firearm with 90% confidence, and that the alert continued after school staff and police reviewed the image and concluded it was a mistake.

Damon Hewitt, president and executive director of the Lawyers’ Committee for Civil Rights Under Law, which represents the students, said: “These students were failed not only by a technology that is prone to false alerts, but also by the very adults meant to keep them safe when we send them to school,” he said. “Instead of this protection, they were met with guns and traumatized. And it could have been even worse.”

The lawsuit says Maryland’s office of the inspector general for education found that “more than 99% of OGD Alerts in Baltimore County Public Schools were false positives that required no police response”. Omnilert markets its product as reliable and as leading to “fewer false positives”, according to the article.

The complaint also alleges that the school principal made light of the incident in text messages to fellow administrators and did not apologize to the students. It quotes one officer as saying, “Fucking Omnialerts” and “Stupid AI cameras,” and says another joked: “Be careful on school property, especially holding stuff like that … be careful with your chips bags.”

According to the complaint, students reported pain from tight handcuffs and lasting emotional distress. Allen said he no longer feels safe waiting for rides or spending time at school after hours, and often pays for rides home to avoid waiting for friends or family.

Freida Winfield, whose son Keith is among the plaintiffs, was on her way to pick him and his friends up when they were detained. “No child in Baltimore county should face this kind of danger while waiting outside his own school for a ride home from his mother,” she said.

Omnilert, the school principal, Baltimore police and the board of education did not immediately respond to a Guardian request for comment. An Omnilert spokesperson previously told the Baltimore Banner the company was reviewing the lawsuit and was “truly sorry for the fear they and their families experienced. We understand why they want answers.” A Baltimore county spokesperson told the New York Times the district could not comment on pending litigation.