Police said officers found a student armed with a gun during a routine weapons screening at Garland High School on Wednesday.
The screening was being done by the Garland Police Department and security for the district.
The 17-year-old student ran from the random screening and was taken into custody a short time later off campus without further incident. Police also found marijuana in the boy's possession.
Garland High School principal Atticus Wiesner said the following in a letter to parents.
"GISD Security and Garland Police responded swiftly and appropriately to secure the situation. Existing internal security measures were also increased at the school.
The safety of students on campus is of the utmost concern to the district. I appreciate your understanding the confidential nature of police investigations. We will remain vigilant in providing a safe school environment which is conducive to teaching and learning."
The student is charged with evading arrest, possession of a weapon in a weapons-free zone and possession of drugs in a drug-free zone.
"This is an extremely serious offense, and the district takes it seriously," Garland ISD spokesman Chris Moore said. "We are cooperating with law enforcement. Tthis was a violation of law, it was a violation of the student code of conduct and, obviously, we are going to pursue the legal matters we can."
NBC 5's Tammy Mutasa contributed to this report.