A Cedar Park teenager is accused of threatening to shoot teachers and students and saying he had enough ammunition to shoot 100 people at the Harmony School of Political Science in Austin this week, according to an arrest affidavit.

Conrad Perry, 18, was charged with making a terroristic threat, a third-degree felony punishable by up to 10 years in prison.

Police learned of the threat Wednesday after receiving a report that Perry was coming to the school at 13415 FM 620 North with a loaded gun, according to the affidavit. He is a student at the school, it said.

The school is in a part of Austin that is in Williamson County.

Patrol officers detained Perry and the school was placed on a lockdown for an hour as a safety measure, the affidavit said. It said a witness told police he was texting with Perry on Monday when Perry "informed him he was on his way to school to shoot some teachers and students."

The witness said he was able to talk Perry out of going to school and doing it, the affidavit said. Perry told the witness he would go home and unload his gun, according to the affidavit.

A second witness said Perry told her Tuesday that the first witness had found a device that attached to Perry’s hip that had ammunition in it, the document said. It said Perry told the second witness that the device was for his shotgun and that he planned on bringing the shotgun to school.

Perry said to the second witness that "he had enough ammunition to shoot 100 people and three cans of gasoline that he would use to set the school on fire," the affidavit said.

READ: Police: Student at Georgetown High School had loaded gun in pocket

Perry also said to the second witness "he would not feel bad, but maybe afterward he would and he would just kill himself," according to the affidavit. It said the second witness told her mother about what Perry said and the mother called the high school with the information on Wednesday.

Perry told police "he said some things he probably should not have said,’ the affidavit said. He also told police that what he was planning to do was on his cell phone, according to the affidavit. It said officers found text messages from Perry on his cell phone saying he would unload his gun and take it back home.

Perry was being held in the Williamson County Jail Friday with bail set at $25,000.

FOR MORE NEWS: Be sure to follow the Williamson County News Now page on Facebook