The driver of a high-speed train where a mass stabbing took place said he had "probably about 10 seconds" to decide to switch to the slow line before making an unscheduled stop.
Andrew Johnson was driving the London-bound LNER service on 1 November last year when the train stopped at Huntingdon in Cambridgeshire amid a mass attack by Anthony Williams.
Giving evidence, Johnson told jurors at Cambridge Crown Court he heard someone on the intercom "screaming 'there's a knifeman stabbing people'".
Williams, 33, of Peterborough, denies 10 counts of attempted murder on the train.
He is also charged with four other attempted murders following earlier incidents in Peterborough and London.
Johnson told jurors that ordinarily the next stop after Peterborough would be Stevenage, a journey that takes "exactly 30 minutes".
He said when they were around Abbots Ripton in Cambridgeshire and "as it was uphill" the train was travelling at 122mph, adding the service was "bang on time".
Johnson told jurors there was an unusual alarm "which indicated someone was trying to open one of the passenger doors".
"I have five seconds to override or the train will stop immediately," he said.
He said if the train stopped it would take about a mile or 30 seconds to stop.