Officials temporarily placed the Science Academy in Mercedes under lockdown after receiving reports of gunfire from a nearby levee.
It all happened just before 3 p.m. Tuesday.
Mercedes Police Chief Olga Maldonado told Action 4 News that an officer was patrolling the area when the report of gunfire came in.
Chief Maldonado said that the male suspect tried to flee the scene in his red pickup truck but was caught.
Officers took the suspect to the Mercedes Police Department for questioning.
No injuries were reported during the incident.
Amanda Odom with the South Texas Independent School District told Action 4 News that lockdown was lifted just after 3:30 p.m. Tuesday.