aijohn784/iStock(LA HABRA, Calif.) — Students at a California high school tackled a gunman and managed to take his weapon from him after brandishing it at the school, police said.

La Habra High School went on lockdown Tuesday morning after a student yielded a .22 caliber gun in the school, according to a statement from La Habra police.

However, two freshmen in the class ran up to him, wrestled him and got the weapon out of his hands, Sgt. Jose Rocha told ABC News on Wednesday.

“It was the students who tackled him,” Rocha said.

The high school, located in Orange County, was placed on lockdown following the incident. The lockdown was lifted not long after it went into effect.

All students and faculty were safe, according to the school.

Police said a student was detained and a weapon was recovered at the scene.

It was not immediately clear if the student was trying to show off the handgun or sell it, however it was not loaded, according to police.

Rocha said the student, who was not named, was placed into a juvenile detention center.

Calls to the district attorney’s office on whether the student is facing charges were not returned.

Copyright © 2019, ABC Audio. All rights reserved.