The 17-year-old, who cannot be named for legal reasons, also asked for advice from the chemistry teacher about making explosives and told him he wanted to “blow up a mosque”, the Old Bailey heard.
The teenager is on trial accused of stockpiling weapons for a terror attack on his former school, as well as naming his college, a local mosque, a cinema and council offices as potential targets.
The teacher, who cannot be named, told the jury his former pupil looked at firearms on the internet while at school and referred to weapons used in the Columbine high school shootings in Colorado, in which 13 innocent people were killed.
“He was encouraging me to look at the guns and make some sort of judgment about whether it was a good gun,” the teacher said.
“He asked me which gun I would prefer to be shot with.
“The message – which I took to as an empty threat at the time – was he was considering a shooting.”
The teacher told the court that the student would launch “tirades” against particular religions, aiming his abuse mainly at the Muslim and Jewish faiths, as well as targeting a pupil with German grandparents.
“There were many instances of defiance and instances of racial abuse,” he said. “Instances of racism, tirades – long, drawn-out – which were frankly painful to listen to.
“He seemed to believe that people of the Muslim religion did not have a place in this country. “He said, ‘I f*****g hate Muslims’ and expressed a desire to blow up a mosque.”
The teacher added: “He was aware I’m a chemistry teacher. He also liked to ask about explosives which I did not get involved with because I do not want to be the one to teach someone how to commit an atrocity.”
The teenager also claimed to have gone to an English Defence League march and asked the teacher if he had attended, the court heard.
“I can only guess that he takes pleasure in humiliating and trying to intimidate with such a remark,” he told the court.
The defendant, who has Asperger’s syndrome, denies a charge of possessing items for the purpose, preparation and instigation of an act of terrorism.
The boy also denies one count of possessing a document or record containing information likely to be useful for a person committing or preparing an act of terrorism, and a further count of possessing explosives in the form of component parts of IEDs. The trial continues.