CRESTVIEW — A high school student has been charged with several felonies after he was arrested Thursday for having a firearm on school property, lawmen said.

According to a press release from the Okaloosa County Sheriff’s Office, 15-year-old Jabari Imani was detained by Crestview High School's school resource officer after information developed that he might have a handgun.

The .22 caliber Ruger revolver was found in student’s waistband but was not loaded. A half dozen .22 caliber rounds were found during a secondary search of Imani's backpack, the Sheriff's Office said.

Deputies say no known threats were made toward the school or anyone at school. The boy said he had the weapon to protect himself after he left the school grounds, the Sheriff's Office reported.

The Sheriff's Office said Imani had been living in a shed behind a friend's home on West Bowers Avenue. Deputies went to the home where the shed was located, and the homeowner gave permission for them to search the shed. Deputies found a backpack and small hand bag under a tarp. Marijuana and other items were found along with .22 rounds, a 9 mm magazine and other ammunition.

The Okaloosa County School District said Crestview High School administrators received a tip that the student had a weapon, and worked closely with deputies to detain Imani.

“We live in a great community, but we are not immune. Incidents like this are becoming an unbelievable and unfortunate reality in society today," School District Superintendent Marcus Chambers said in a statement. "I do know that our schools are safer when students, parents and school staff work together as they did today.

"I encourage everyone in our community to continue to be vigilant and to tell someone when you see or hear something that poses a potential threat to our schools or community."

Imani was charged with possession of a firearm on school property, carrying a concealed firearm, possession of a controlled substance without a prescription, possession of more than 20 grams of marijuana and possession of drug paraphernalia.