The gun and some loose ammunition was found in a student's backpack, Des Moines police told KCCI. The school was not placed on lockdown because the gun was reported during a passing period.

"We were able to lay eyes on that student immediately and follow that student until we got into a secure location, so we were able to deal with the situation then," Principal Paul Williamson said.

The student was arrested, and authorities said he will be charged with taking a weapon on school property. School officials said the student did not intend to hurt anyone and he didn't have any issues with other students. They said the student told them he had been dared to bring a gun to school.

"He simply was just given a dare and decided to take the challenge," said Sgt. Jason Halifax of the Des Moines Police Department. "He indicated that the gun was owned by his mother's boyfriend. And that he was able to get it out of the safe, out of the house without their knowledge."

Lincoln High School parents were notified of the incident by an email on Friday afternoon. The email reported that school officials heard that a student was in possession of a handgun at 11:30 a.m.

The student was removed from the classroom, and an uloaded handgun and some loose ammunition were found in the student's backpack, authorities said.

The student was arrested and will be disciplined. The student's name was not disclosed in the letter.

Look for more on this story coming up on KCCI-TV, KCCI.com and our mobile website m.kcci.com and apps.