A man carried out a series of "calculated and deliberate" attacks, including stabbing a 10-year-old boy in the neck and driving a car into a five-year-old girl, a court has heard.
Carlos Vinodchandra Racitalal, 33, formerly of Finsbury Road, Leicester, is alleged to have attacked the boy while his mother was parking her car.
Mr Racitalal is accused of a series of attacks in the city between 2 and 18 January.
He denies four attempted murder counts.
Leicester Crown Court heard Mr Racitalal, who is also facing three counts of possession of a bladed article, approached the boy on 18 January.
"The defendant came along the pavement and put a hand on [the boy's] shoulder and then drew a knife across [his] neck, cutting it open," said Christopher Donnellan QC, prosecuting.
The boy sustained a 10cm (four inch) deep gash to his neck.
"[He] was millimetres away from ending [his] life," Mr Donnellan said.
The defendant is also alleged to have driven a black Corsa into the back of a five-year-old child who was holding her grandfather's hand in an Asda car park off Abbey Lane on 2 January.
"She was launched forward into another car and fell to the ground," Mr Donnellan said.
"The defendant was driving. It wasn't an accident. It was calculated and deliberate."
The jury heard the little girl suffered injuries to her nose and chin.
"There were screams as [her grandfather] was frantic with distress and was in quite a state for some time because of what he had just seen," Mr Donnellan told the court.
In another attack, a woman was walking home with her two children, aged six and three, on 14 January when she was stabbed in the back of her head.
"She saw someone there with a yellow-handled knife," Mr Donnellan said. "That person didn't say anything, didn't ask her anything, didn't grab anything, didn't take anything.
"She didn't see where he came from and didn't see where he went."
A further attack took place on 16 January on a man who was walking home after going shopping.
"The attack on him near his home by the defendant was brutal," said Mr Donnellan.
"The defendant used a huge knife to attack [the victim], striking him around the head more than once, causing nasty wounds.
"Mercifully his wounds didn't prove fatal.
"On each occasion the defendant was launching an unprovoked attack on a vulnerable child or adult. Each defenceless. Each taken by surprise," the court was told.
"On each occasion he left the scene and didn't do anything to check on his victims or help them."
The court heard Mr Racitalal handed himself into a police station after CCTV of the attacks was released on social media, and he was arrested on 20 January.
The trial continues.