A Fort Payne High School student was arrested after police seized a rifle from his vehicle on campus, authorities said today.

The 18-year-old student was taken into custody March 3 and charged with possession of a firearm in certain places, Fort Payne police Chief Randy Bynum said in a news release. Alabama law prohibits people, in some cases, from having guns in places like schools, jails and courthouses.

The rifle was seized from the back seat of the student's vehicle after school administrators were notified the weapon might be there, Bynum said.

School Resource Officer Matt Wilson located the student and took custody of the rifle.

"During the course of the investigation the student stated that he was shooting the weapon on private property the evening before and forgot to remove the firearm from his vehicle," Bynum said in a statement. "At the time of this arrest it is believed that this student did not have any intent to harm anyone. It appears that this student just simply made a mistake which in this situation is a violation of the law."

Police said the student's lawyer requested and was granted youthful offender status for his client. Therefore, the student's identity isn't being released.