Authorities say William Atchison died in Friday's shooting.
[Ads /]
They also say the former student at Aztec High School legally purchased a handgun at a local store a month ago and planned the attack.
Atchison left a message on a thumb drive found on his body Friday. It detailed his plan to wait until the students got off buses and made their way to class.
He then mingled with students and walked into school with them. Before he moved into a second-floor bathroom to "gear up."
[Ads /]
Chief Pete Kassetas of the New Mexico State Police Department said, "Some of you have seen a video of rounds that have exited a glass walkway, that was him shooting out of a glass, shooting in the classrooms, as was indicated earlier he entered the computer lab with the teacher barricading the students in the back, he knew they were back there and fired rounds towards them."
Police say Atchison walked up and down the hall, firing randomly, before killing himself.
He did not have a criminal record.