A man who killed a 12-year-old boy by driving into schoolchildren in a "deliberate" hit and run has been detained in a secure hospital.
Harley Watson died after he was hit by a car outside Debden Park High School in Loughton, Essex, on 2 December 2019.
Terence Glover, 52, pleaded guilty to manslaughter by diminished responsibility at an earlier hearing.
He also admitted 10 counts of attempted murder and has been detained under the Mental Health Act indefinitely.
At the sentencing hearing at Snaresbrook Crown Court, Harley's mother Jo described her son as a "kind, caring, selfless, intelligent and comical young man".
He was hit by Glover's Ford Ka as he left school with friends and died later in Whipps Cross University Hospital.
Christine Agnew, prosecuting, said eye-witnesses saw Glover's car "ploughing through and hitting children from behind".
She said he "deliberately mounted the pavement... and drove directly at a group of people, mostly children, intending to kill them".
Glover, previously of Newmans Lane, Loughton, also pleaded guilty to the attempted murder of 23-year-old Raquel Jimeno and six boys and three girls aged between 12 and 16 who were outside the school.
The court heard he suffered from paranoid schizophrenia and medical experts agreed his "significant" mental illness "provided an explanation for his conduct".
He was given a hospital order under the Mental Health Act 1983, meaning if his illness was treated successfully, he would be transferred to prison.
Judge Andrew Edis said if transferred, Glover must serve a life sentence with a minimum of 15 years.
In his sentencing statement, Judge Edis noted his history of mental illness and cocaine use, but said Glover's actions were "appalling".
"He caused the death of a much-loved and admired 12-year-old boy who had done no harm to anyone," he said.
He added that Glover's behaviour "requires punishment as well as treatment" and there was "no doubt that this defendant is dangerous".
He also ordered that Glover be banned from driving for life and that the car should be destroyed.