Zachary police Thursday arrested a man they said admitted to firing a rifle at Zachary High School earlier this month, although 19-year-old Morgan Hubert said he didn't realize the weapon was loaded.

Hubert told officers that he shot a .22 caliber rifle at the school twice after watching the movie American Sniper, Zachary Police Department Chief David McDavid said. Superintendent Scott Devillier said that Hubert was previously a student at Zachary High.

Hubert was cleaning out a travel trailer at his grandmother's home on Myrtle Hill Avenue, a street near the school, when he found the gun, McDavid said.

Officials say that he then pointed the weapon out the window of the trailer at the school and fired it twice. Hubert said he didn't think there were bullets in the rifle.

One shot hit a building near the football field, but no one was hit. Devillier said the bullet caused minor damage to a window.

Five Zachary schools were on lock down for hours on Feb. 6 after a teacher heard the shots. McDavid said that officers went door to door in the area, but could not find more information that day. He credits a Crime Stoppers tip with the arrest.

That same day, a 14-year-old student at Scotlandville Magnet High School was arrested for allegedly firing a gun inside that school. Nobody was injured in that incident and the student was apprehended outside the school building. He potentially faces an attempted second-degree murder count and other charges in East Baton Rouge's juvenile court. 

Hubert was booked into Parish Prison on aggravated criminal damage to property and illegal use of a weapon.

"Gun safety is very important," McDavid said. "Guns don't kill people. People kill people."

He added that Hubert should have checked if the gun was loaded and shouldn't have pointed it at the school.

Devillier said that the students, teachers and administrators at all of the schools practice lock down, shelter in place and evacuations once a month. Those procedures were used twice that week with the shooting and the tornadoes the next day.

"You always hope something like this wouldn't happen on a school campus, but we did take every precaution. … We continue to look for ways to keep our kids safe," Devillier said.

Follow Emma Discher on Twitter, @EmmaDischer.