A teenager tried to murder a doctor in a "truly terrifying" and unprovoked knife attack, a jury has heard.
Chanz Maximen, now 18, denies attacking Adam Towler, who was stabbed nine times after answering the door of his home in Bristol on Halloween night last year.
Dr Towler suffered nine stab wounds including one that missed his heart by centimetres, Bristol Crown Court heard.
Dr Towler said he had first thought it was a prank. He said he asked the attacker: "Is this trick or treat?"
Giving evidence, he said: "There was no verbal response that I remember.
"The next thing I remember is being pulled outside my property. There was a sudden blunt force to the left side of my chest."
Prosecuting, Ray Tully told the jury: "His ordeal was truly terrifying - it is the stuff of which horror movies are made."
The jury also heard that Mr Maximen was responsible for two other unprovoked attacks in the Clifton area last autumn.
The teenager, who was 17 at the time, is alleged to have caused grievous bodily harm to Wojtek Rozmiarek, a warehouse worker who was stabbed in the head as he sat on a bench on 20 November.
'Finish him off'
He is also accused of aggravated burglary, after allegedly following Annabel Everitt as she walked home from a night out on 21 November before knocking on her door and coming inside with a knife. He denies all the charges he faces, which include attempted murder, causing grievous bodily harm and aggravated burglary.
Regarding the attack on Dr Towler, Mr Tully described it as "frenzied".
"He was effectively left for dead by the man who had attacked him," Mr Tully told the court on Thursday.
Pouring with blood, Dr Towler tried to get help outside from neighbours but went back inside when he saw his attacker running towards him, the jury heard.
"The male who had attacked him was then banging at his door, trying to force entry, presumably to finish him off," Mr Tully said.
Police detained Mr Maximen at Clifton Down railway station and found two knives in his coat, the court heard.
The trial continues.