Images of murdered soldier Lee Rigby and British Islamic State executioner Jihadi John were among extremist material found on a Tube station knife attacker's phone, a jury has heard.
Muhiddin Mire, 30, went on a rampage with the blade at Leytonstone Underground station on December 5 last year, cutting the throat of musician Lyle Zimmerman so that his windpipe was exposed, the Old Bailey heard.
Prosecutor Jonathan Rees QC said police found material linked to Islamic State on Mire's phone, as well as images including: "Fusilier Lee Rigby. He was the young soldier who was hacked to death and effectively beheaded in May 2013. Images of the man who became known as Jihadi John."
The prosecutor went on: "The contents of the defendant's phone, when looked at alongside what he said during the course of the incident ... provides an insight as to what motivated the defendant to do what he did and what he was seeking to do to Mr Zimmerman."
The musician suffered "a deep and ragged wound" to his neck, and his windpipe was exposed. There were three cuts - one 4.7in (12cm) long and two 2in (5cm) long.
As Mire was led away by police, he said: "This is for Syria, for my Muslim brothers," and explained that his actions were in response to the bombings of hospitals in the war-torn state, the jury was told.
Dramatic footage of officers firing Tasers at Mire three times before he was brought to the floor was shown to the court.
He said "Allahu Akbhar" (God is great) as he was hit by the stun guns.
Mire was filmed outside the station by a member of the public, Daniel Bielinski, who could be heard in a five-minute clip played in court screaming "Call for police" and trying to warn other passengers away as Mire returned inside, still clutching a knife.
Mr Rees told the jury the footage was "fairly dramatic stuff, as you will appreciate".
It showed Mire slowly walking after Polish Mr Bielinski, who continued filming him and asked in heated exchanges: "Why you attack me and my girlfriend?"
As Mire returned to the station, Mr Bielinski screamed: "Be careful, be careful. Knife blade. Call for police. Security."
Somali-born Mire, who came to Britain as a young boy, accepts that he used the knife, and the issue for the jury to decide is whether he intended to kill Mr Zimmerman.
Mire, of Sansom Road, Leytonstone, denies attempted murder but admits four counts of attempted wounding and an alternative count of wounding with intent to cause Mr Zimmerman grievous bodily harm.