Students at a Denver middle school alerted administrators Friday morning that at least one of their classmates had a gun, leading to a lockdown, the arrest of three boys and questions about their intent.

Police say two of the students had each brought a handgun to Skinner Middle School and a third was in possession of some kind of smoke device.

Officers, some clad in tactical vests, scrambled to the school to search its hallways, causing frantic parents, some in tears, to rush to be with their children and hug them in relief.

“It’s a parent’s worst nightmare,” said Dolly Kilgore, who came to pick up son Nathan and left crying tears of joy.

School shootings across the country — including at Columbine High in 1999 and Arapahoe High in 2013 — prompted school officials to stress the importance of students speaking up about possible danger.

Unlike at Arapahoe, where some say warning signs were not acted upon, the alarm bells were sounded before it was too late.

“Our students are to be commended for seeing something and saying something right away,” Cmdr. Paul Pazen said at a news conference. “These types of tragedies are averted by students that have been taught, reinforced and shared that if you see something, you let the staff know.”

No injuries were reported Friday. Police said two students were arrested on suspicion of being in possession of a handgun and a third on investigation of having a suspicious device. Police say they are working to determine what the suspicious smoke device was.

“We are going to make sure we know all of the ‘whys’ in this,” Pazen said, stopping short of speaking on any possible motive. “We are going to make sure to dig deep with everything we have possible to find out how and why this happened.”

Sixth-grader Ella Rodriguez said one of her best friends reported one of the students to the principal as being suspicious. She said her friend saw what looked like a gun in one of their bags.

“I thought we were on a drill at first,” Rodriguez said. She said she heard police officers outside her classroom saying “It’s clear!” and “Keep searching!”

Parent Lisa Archuleta said the principal told her the weapons were found in lockers.

Still, at least one student said he initially kept silent.

Leonel Loya, an 11-year-old in sixth grade, said his friend and his friend’s brother brought the guns to school. Another friend brought the smoke bomb.

“I asked them what they were going to do with it, but they (didn’t) want to tell me,” said Loya, who was with his mother and older sister. “They said not to tell anyone because they didn’t want to get in trouble.”

Loya said the boys showed him the two guns and the bullets loaded inside.

“They didn’t want to tell me,” Loya said of what the boys planned to do with the weapons. Loya said he didn’t speak to administrators because he was scared of retaliation and was afraid of getting his friends in trouble.

Officials declined to identify the boys or disclose their ages because they are children. Police said they don’t plan to release further details immediately.

“We’re still digging,” said police spokesman Sonny Jackson.

Denver Public Schools train once a semester for lockouts and lockdowns, district officials said. Within the past several weeks, Denver police and a hospital conducted joint training on a school catastrophe scenario.

Officials credited their preparedness and school education with Friday’s swift response.

“This successful outcome did not happen by accident,” Pazen said.

John McDonald, executive director of security and emergency management for Jefferson County Public Schools, praised Denver for its work with students.

Staff writer Joey Bunch contributed to this report.