A student from Branson High School has been charged with threatening terrorism after allegedly sending threatening messages to fellow students.

Authorities say William James Nelson, 18, pledged  “his allegiance to Allah,” and attempted to purchase an AR-15 rifle. He texted a female classmate, warning her not to go to school on Friday, and that if she heard his name in the news, she knew why. She sent screenshots of the conversation to the police.

They say he claimed he was going to purchase the rifle the day he was arrested and that he was off his medication.

Nelson allegedly stated that he had planned to commit suicide with the gun but had not decided whether or not to harm anyone else.