A "deranged" former student who disguised himself as a pupil, then shot dead a cheerleader and football player before turning the gun on himself, was known to the FBI.

William Atchison shot dead Casey Jordan-Marquez and Francisco Fernandez at the Aztec High School in Aztec, New Mexico, on Thursday (7 December).

Authorities in New Mexico today identified the 21-year-old, saying that in a carefully-planned attack Atchison sneaked in the school pretending to be a current student before opening fire.

The gunman injured another 15 people before turning the Glock 9mm handgun on himself and leaving a series of writings, where he laid out his deadly plan.

"He was focused and he was deranged," San Juan County Sheriff Ken Christiansen. "This was a planned event."

It also emerged that in March 2016 Atchison was questioned by the FBI after they were tipped off about some comments he had written on an online gaming forum.

The Mail Online reported that he had discussed what weapons might be used in a mass shooting, but FBI Special Agent Terry Wade said: "It was not a specific threat, it was not about Aztec, in particular".

Wade said agents even visited the family home and "extensively" interviewed the suspect and his parents, but closed the investigation after assessing the suspect's computer files and online presence.

William Atchison
William Atchison, 21, was identified as the gunman who shot two students and injured 15 at Aztec High School in New Mexico on Thursday (7 December). Police handout

Police say that Atchison, who lived in Aztec with his parents and had no criminal record, carried out the massacre with a legally-owned gun, beginning the attack just after 8am.

Atchison, who did not graduate from high school, was armed with a pistol and carrying a backpack with multiple magazines.

He fatally shot Francisco "Paco" Fernandez on the second floor before killing Casey Jordan-Marquez, then walked up and down the hallway firing indiscriminately into classrooms.

Students and teachers had to barricade themselves in classrooms, but after failing to kill anyone else he turned the gun on himself.

According to officials he left behind writings on a recovered a USB drive written on the day of the killing, saying: "if things go according to plan, today would be when I die. I'd go somewhere, gear up, then hold a class hostage and go apes**t, then blow my brains out."

Another note read: "Work sucks, school sucks, life sucks. I just want out of this s**t."