Matin Azizi-Yarand was arrested on Tuesday (when he is pictured) and charged with criminal solicitation of capital murder and making a terrorist threat

A 17-year-old high school student has been charged with terrorism offences after allegedly planning an ISIS-inspired mass shooting at a shopping mall before his plot was busted by the FBI.

Matin Azizi-Yarand told an informant he planned to release a 'Message to America' explaining his reasons for the attack on Stonebriar Centre Mall in Frisco, which was scheduled for mid-May.

At the time of his arrest at his high school on Tuesday, the student had spent more than $1,400 buying weapons and tactical gear. He had also been trying to recruit others to help him.

Azizi-Yarand now faces life in prison for criminal solicitation of capital murder and another 10 years for making a terrorist threat. He is being held at the Collin County jail on a $3 million bond.

The student, who lives with his parents, began speaking with the FBI informer in January 2018.

The student told the informer he had been reading ISIS manuals on how to carry out attacks, but planned to wait until he turned 18 before carrying out his own so he could buy the rifle himself.

Azizi-Yarand told an informant he planned to release a 'Message to America' explaining his reasons for the attack on Stonebriar Centre Mall in Frisco, (pictured in an undated photo) which was scheduled for mid-May

The affidavit quotes him telling the source over Internet messages: 'Look at all the other lone wolves. What training did they have yet they simply killed the kuffar? [disbelievers in Arabic]'

'The brothers in Europe and the brother in New York? Had no military training. It's not about numbers it's about getting a message across to these taghut (non-Muslim) countries.'

The 'New York brother' Azizi-Yarand referred to was most likely Sayfullo Saipov, 29, who killed eight people after driving a rental lorry down a bike path in October.

He then added: 'But I swear I want to achieve Allah's pleasure and kill the kuffar... I've only been reading ISIS magazine guides for performing operations and making bombs.

The student, who lives with his parents, began speaking with the FBI informant in January 2018 and soon gave away the details of what he was planning

'In [ISIS] magazines they have claimed it is not about how many kill but how much money you will make these countries spend in security just for a simple attack although having a high number will get their attention.'

Azizi-Yarand then told the informer he planned to travel to Pakistan, cross into Afghanistan and then join ISIS. He also sent over several propaganda videos about life under the terror group.

The student said he was struggling to decide whether to join ISIS or perform a terror-attack on American soil, before deciding on the latter and asking if the informer wanted to join him.

He stated: 'We can still [travel to join ISIS] no problem, but then we are just like the rest,' before adding that he had decided on a terror attack and had been going to the gym for physical preparation.

In further messages, Azizi-Yarand discussed ambushing a Hindu temple and even a school because 'it is the perfect place for an attack - just fire where you hear screams'.

After deciding on Stonebriar Centre mall, he sent the informant a link to his 'Message to America', a rambling speech in which he accused the US government of bringing terror attacks upon yourselves' by 'bombing Muslims.

The student also sent the informant a document written by Eric Harris, one of the attackers involved in the 1999 Columbine High School massacre, which killed 15 including Harris and co-shooter Dylan Klebold.