MANOR, Texas — The Travis County Sheriff's Office has released the name of a student arrested this weekend after police allege he was plotting an attack on the school.

Seventeen-year-old Rafael Gamboa, a Manor Independent School District student, is charged with exhibiting a firearm on campus, a felony charge.

According to the arrest affidavit, a school resource officer was contacted by Manor High authorities Nov. 10 after Gamboa allegedly posted several threats to the school on his Snapchat. The affidavit states a video with the caption "Loads Glock, oh I'll make yall red" was posted during the school's pep rally, and that Gamboa appeared to be hiding behind bushes while recording other students. Police said in the affidavit “Students who observed the original post were afraid and did not want to remain in school with him.”

Gamboa was removed from class by an assistant principal, and a search of his phone was conducted with his permission. The affidavit states several photos and videos were found on the phone, including a map of the school and several images/videos in which Gamboa made threats of violence. One contained Gamboa with an assault rifle with the caption "I got what I need."

The affidavit stated a video Gamboa was shown holding a movie video case in a way to mimic holding a gun with the captions "Don't come to school tomorrow or face my ultimate weapon."

Travis County Sheriff deputies conducted a search of Gamboa's room with his parent's permission and found the hand drawn map used in the video. The legend on the map coincided with marking on the map that indicated shooting positions, locations of explosives, location of attack vehicle and movements through the school.

In a statement to families, the district says “we wanted to remind families that we are taking proactive steps to ensure student safety and that we have a zero tolerance approach regarding threats to students or the presence of firearms on campus."

Gamboa was arrested Friday night.