Jurors later watched a video recorded interview with Dawid Taborski, who Williams is also accused of attempting to murder.
Taborski said he was going to a rave with a friend when he heard a man with a “very, very deep voice” asking “are you involved, are you involved?”.
He said the man pulled a knife out of a backpack and lunged at him.
Taborski said he told the armed man, “mate, just step back” before he “literally… ran for my life”.
Jurors also saw a video interview with William Ogelby, who was on his way to a cashpoint when he was attacked.
A man walking towards him said “wagwan” to him, which he understood to be a greeting, and he said it back.
Ogelby said the man then pulled a kitchen knife out from a rucksack “and he’s tried to stab me three times in the stomach and once in the chest”.
Ogelby said he jumped back as soon as the man lunged and “in that moment I’ve just ran off”.
“I thought he was going to kill me,” Ogelby said.
During the prosecution opening, jurors were told Williams “has some mental health issues which may or may not become relevant during this trial”.
The trial has been told that whether Williams carried out the attacks is not in question, but jurors must consider whether he intended to kill those individuals.
Williams is accused of attempting to murder Raza Aslam, Sachin Balakrishnan, Stephen Crean, Kevin Deely, Scott Green, David Presland and Samir Zitouni on the London-bound train between Peterborough and Huntingdon on the Saturday evening, along with Scott Bletcher, Jonathan Gjoshe and Michael Paffett.
As well as the attacks in Peterborough, he is accused of attempting to murder a teenager on a Docklands Light Railway train in London in the early hours of 1 November.
The trial continues, with jurors asked to return to court on Monday.
