(CNN) When a gunman opened fire in a University of North Carolina at Charlotte classroom, sending people diving for cover and rushing toward a door, student Riley Howell charged and knocked into the shooter, police say.

Howell died for his efforts, shot by the gunman he rushed. But he was the "first and foremost hero" in bringing Tuesday evening's shooting to an end, Charlotte-Mecklenburg Police Chief Kerr Putney said.

"He took the fight to the assailant," Putney said Wednesday. "Unfortunately, he had to give his life to do so, but he saved lives doing so."

Putney said the 21-year-old Howell -- one of two people killed in the shooting -- knocked the gunman off his feet, and that helped lead to his capture.

Riley Howell

An officer ran into the classroom, disarmed the suspect and arrested him, police said.

Read More