A triple-killer who left two prison guards fighting for their lives was stopped by a third who took him on barehanded, a court has heard.
Neil Walker was stabbed repeatedly as he fought Kevan Thakrar, 23, to the floor at Frankland High Security Prison, Durham, in March last year.
The convicted murderer, who had armed himself with a broken glass bottle, had injured two of Mr Walkers' colleagues moments before.
He was chasing prison officer Claire Lewis, who he had stabbed in the back, along a prison landing when Mr Walker stepped into his path.
Thakrar had left another officer, Craig Wylde, bleeding arterial blood after slashing his armpit as he was released from his cell.
The first Mr Walker knew of the killer's rampage was when he heard a scream and saw the prison walls and landing of G Wing covered in blood.
He told a trial at Newcastle Crown Court his "first thought" was to protect Ms Lewis.
He said: "I heard a bang and a woman scream and the alarm bell sound.
"I went up the stairs to the two's level to investigate and when I came up I saw blood splattered up the walls, on the floor, all over the place.
"Officer Lewis was running towards me, as fast as she could. The prisoner Mr Thakrar was chasing her and my first thought was to get in front of her and stop him getting to her."
Mr Walker was armed with an extendable baton but did not have time to draw or extend it. He was wearing no prison-issue body armour.
He told the court: "I could hear Officer Lewis shouting 'get away from me, get away from me'. I did not know at that stage she was injured.
"I stepped in front of her and Thakrar slowed down, but kept coming towards us.
"He had his arms out to the side and was shouting 'come on, come on'.
"He looked angry.
"I attempted to restrain him. I did not know at that stage he had a broken glass bottle in his hand."
Mr Walker pushed Thakrar backwards by the neck as the prisoner hacked at his face, head, and body.
He then pinned him to the floor until other officers arrived to help.
It was only when Mr Walker was taken by colleagues to the staff room he realised how badly he was injured.
The officer was permanently scarred and left with a debilitating back injury for which he still receives treatment.
He has returned to work at the prison after four months convalescence.
Thakrar, originally from Stevenage, in Hertfordshire, is on trial accused of attempted murder and wounding with intent.
He has denied all charges, saying he attacked the guards in self-defence.