A 16-year-old student who brought a loaded gun to St. Paul's Harding Senior High School on Wednesday has been charged by juvenile petition with felony possession of a dangerous weapon on school property.

The student told police he associates with the AC gang and was carrying the gun for protection against other gang members, the petition states.

The petition, filed Thursday in Ramsey County District Court, does not say whether the gang members whom he allegedly fears attend Harding High.

An assistant principal at the school discovered the .22-caliber handgun after searching the student's backpack for marijuana. The incident became one of several cited by Superintendent Valeria Silva at a Wednesday news conference about recent school safety issues.

She said the discovery marked the first time in her nearly six-year tenure at the top of the state's second-largest district that a loaded gun had been found in a school.

Principal Doug Revsbeck said the student had carried the backpack with the gun inside into a school classroom, and there were no signs he intended to use it in the school.

The petition contains no mention of him making any threats, and quotes him as saying, "I am really sorry, officer," after police arrived at the school.

According to the petition, the student was sent to the assistant principal's office after a teacher detected the smell of marijuana on him. He admitted to having marijuana in the backpack, and when he didn't respond to the assistant principal's question of whether he had anything else that the school administrator should know about, the assistant principal reached inside and found the gun wrapped in a white T-shirt, authorities say.

A police check revealed that the gun had been reported as stolen out of Green Bay, Wis.

The student told a police investigator that he found the weapon in some weeds on Payne Avenue about two months ago, and he denied any involvement in the theft, the petition states.

He also faces a petty misdemeanor charge of possession of a small amount of marijuana.

Anthony Lonetree • 651-925-5036