A 13-year-old boy accused of stabbing two children at school had a picture of an Islamic State (IS) soldier as his phone's wallpaper, a court has heard.
The image was taken from a warfare video reposted by the boy on TikTok four days before he filmed himself stabbing two boys in the neck at Kingsbury High School in Brent, north-west London, on Feb 10, it was claimed.
The teenager shouted "Allahu Akbar" as he attacked the boys and then declared: "I'm not a kid any more, I'm a soldier," as he fled the scene, a court has heard.
On Wednesday, jurors in his Old Bailey trial heard evidence of the defendant's activities leading up to the incident.
On Feb 6, a TikTok account linked to the defendant had reposted a video showing explosions interspersed with a Satanic symbol, jurors heard.
An image taken from the video of a ball of flames was used as a lock screen on the defendant's phone. His home screen was of a soldier holding a black IS flag, the court was told.
The next day, he accessed a video on YouTube of a documentary, "I Joined Isis on Roblox", in reference to the online game.
Two boys were filmed being stabbed in school - David Rose For the Telegraph
On the morning of the attack, the defendant was captured on CCTV leaving his home and being driven to school by his father, who dropped him off at 8.34am.
Instead of entering the school premises, the defendant walked off and took a bus to The Broadway, Mill Hill, where he bought an ant-killer spray for £3.99 in a pound shop at 8.52am, the court heard.
Further CCTV footage was played in court tracking the defendant's journey home, where he jumped on a low wall and onto a garage roof to access the rear entrance.
He was inside the property for two-and-a-half minutes before leaving at 11.45 am, still in his school uniform.
The defendant arrived at Kingsbury High School shortly before 12.30pm, with his phone fixed on the front of his school blazer allegedly to film the events that followed.
He walked through corridors to the classroom identified on his timetable. He knocked on the door and allegedly used the insect repellent he had bought earlier to spray on a child and gained access.
The insect spray allegedly used on school children before the attack - Metropolitan Police
In front of a class of children and their teacher, he then grabbed a boy and stabbed him in the head, neck and shoulder area while shouting "Allahu Akbar" (God is the greatest), jurors have heard.
He proceeded from the classroom into a playground where he allegedly stabbed another boy in the neck.
As he ran away, he was allegedly recorded on his camera phone saying he wanted to be a "martyr" and describing himself as a "soldier".
In further video played in court, the defendant talked of the beheading of a British soldier, describing the killers of Lee Rigby as his "brothers".
The knives allegedly used by the schoolboy in an attempt to kill two boys - Metropolitan Police
Some three hours after the attack, the defendant walked into a mosque and told an imam that he had "stabbed a kid".
The imam called police and the youth was arrested.
The prosecution asserts that the defendant had filmed himself at the school to show that he had committed a terrorist attack "in the name of Allah".
Jurors have been told the issue in the trial would be whether the defendant intended to kill when he stabbed the children.
The youth has denied two charges of attempted murder.
The trial continues.
Try full access to The Telegraph free today. Unlock their award-winning website and essential news app, plus useful tools and expert guides for your money, health and holidays.