MADISON, Wis. — A 13-year-old boy who had researched school shootings online was arrested hours after he tried to enter a Wisconsin elementary school while armed and then fled when confronted by school staff, police said.

“We narrowly missed a tragedy,” Kenosha Police Chief Patrick Patton said Thursday afternoon.

Police believe the boy had a firearm when he was stopped around 9 a.m. Thursday while trying to enter Roosevelt Elementary School with a backpack and a duffle bag in Kenosha, about 55 kilometres south of Milwaukee.

School staff members questioned the teen in a secured entrance area, and surveillance video showed a large black bag at his side, Patton said.

“The only reason the individual was not able to fully enter the school was because of the quick and diligent actions of the school staff,” he said Thursday at a news conference. The boy immediately fled on foot when school staff approached him, Patton said.

The “suspect actually tried numerous outside doors and entrances before coming around to where our secured entry is,” said Kenosha Unified School District Superintendent Jeff Weiss.

The teen attends Mahone Middle School and was a former Roosevelt Elementary student, police said. Officers arrested him at his home around 2 p.m. following a communitywide search, police said in a news release Friday morning.

Investigators “have information that the suspect performed multiple internet searches related to school shootings,” Patton said, adding that the teen had shared videos and made several comments to fellow students for weeks before Thursday.

“This is something that had been told to people of his growing intentions,” Patton said. “We know that there is internet searches and all the red flags that we would look for and expect someone to report were there.”

Police received at least one video of the student wielding what investigators believe is a rifle, Patton said. The chief played a video at Thursday’s news conference that shows the student holding a firearm as he appears to practice room-entry techniques, Patton said.

The chief did not specify when or where the video was filmed, but it appears to have been filmed in a home. In one scene, a cat strolls by in front of what appears to be a couch.

Police have not released the boy’s identity or said how he had access to the gun. They said the suspect’s mother is cooperating with police.

The teen told detectives he went to the elementary school to sell candy but later told a social worker he intended to scare students, police said Friday.

A search of his home netted several pellet guns that resembled real handguns and a pellet gun that resembled a real rifle, but it did not uncover any actual firearms, police said. The teen’s mother told investigators he doesn’t have access to real guns.

Messages left Friday morning for Kenosha police and Kenosha County prosecutor Michael Graveley seeking more details weren’t immediately returned.

All Kenosha Unified schools were placed on a “secure hold” lockdown for the rest of Thursday. There are no classes Friday at the school; the district had previously scheduled a day off for students for a staff workday.

The student was taken into custody in Kenosha some six months after police shot and killed an armed student outside a Wisconsin middle school following a report of someone with a weapon. The May shooting in Mount Horeb, outside Madison, sent children fleeing and led to an hourslong lockdown of local schools. Prosecutors announced in August that the officers who fatally shot the student would not face criminal charges.

Kenosha made national headlines in August 2020 after a white police officer shot a Black man during a domestic disturbance, leaving him paralyzed. The shooting spurred several nights of protests. A white Illinois teenager named Kyle Rittenhouse shot three people during the unrest, killing two of them.

The shootings became a flashpoint in the national debate over guns, vigilantism and racial injustice. A jury eventually acquitted Rittenhouse of any wrongdoing after he argued he fired in self-defence.

— Callahan reported from Indianapolis.