AUSTIN (KXAN) — Two students at an Austin charter school were arrested after both were found in possession of a gun leading to a school lockdown Tuesday, according to an Austin Police Department affidavit.

The affidavit said one of the students posted a photo of him holding the gun at KIPP Austin Collegiate, located at 8004 Cameron Road, on his Snapchat account. The student was identified as a 17-year-old boy, and he faces a third-degree felony charge of unlawfully carrying a firearm on school grounds, the affidavit said. He was taken to the Travis County Sheriff’s Office, the affidavit said, but is no longer in custody according to records.

The other student was younger, the affidavit said, and was taken to Gardner Betts Juvenile Center in Austin. Texas is one of just three states that send 17 year olds through the adult justice system.

The affidavit said after the photo was discovered, the school was placed on lockdown and officers spoke with the 17-year-old. He said the gun belonged to the other student and he just took a picture with it, according to the affidavit. The two met in a school bathroom and the other student had the gun in the waistband of his pants, and that’s when the 17-year-old took the picture of him holding the gun and posted it, the affidavit said.

The gun was eventually found inside a guitar case in the room the other student had been in, the affidavit said. A witness told police they saw the other student put the gun in the guitar case, the affidavit said.

Justin Scott, the regional superintendent for KIPP Texas Public Schools, said the KIPP Austin Collegiate campus was on lockdown for almost an hour-and-a-half while APD investigated. Scott said in a letter to parents that the school went on lockdown at 3:12 p.m. Tuesday.

“Please know we take these situations very seriously, as the safety of our students is always our absolute top priority. I want to stress that our students were safe and never in any danger,” the letter said. “The lockdown was a precautionary measure suggested by the Austin Police Department and teaching and learning continued after the lockdown was lifted.”