A teenager has been detained after officials say he threatened his ex-girlfriend in text messages that prompted a lockdown at a San Antonio high school.

Authorities say Travis Early College High School and a nearby college were placed on lockdown Thursday morning. Investigators say the teen threatened to come to the high school with a gun and attack his ex-girlfriend.

Several officers wearing body armor and armed with rifles were stationed around the school. They eventually made contact with the suspect, and he surrendered to authorities.

The lockdown was lifted by early afternoon.

San Antonio police say officers with the San Antonio Independent School District police force are now handling the case. They'll determine what charges, if any, the teen will face.