A Ugandan court has sentenced a man to death for killing four young children this month at a nursery school, in an attack that sparked public outrage and concern for pupils' safety in the East African country.The judge said an investigation of Christopher Okello Onyum's phone and laptop had found searches including "schools near me" and "ISIS beheading", a reference to the Islamic State group.However, it was not clear if there was any political or religious motivation for the attack.In the attack, which took place on April 2 at a nursery school in the capital Kampala, 39-year-old Onyum stabbed his four victims – toddlers aged two and three years old – before a guard subdued him, police said.Angry parents tried to lynch him before he was detained.Prosecutors said Onyum, who holds Ugandan and US citizenship, confessed to the crime, believing the "human sacrifice" would help him become rich, although he eventually pleaded not guilty in court.The court earlier heard chilling testimony, including from a staff member at the Ggaba Early Childhood Development Centre."At first I thought he was beating a child. When I asked him why he was beating our children, before he responded I saw Kaisha (one of the victims) against a wall in the pool of blood," she told the court at the start of the trial."He got up and he had a knife in his hand. He was so quick that he immediately grabbed another child."I got one of the bicycles the children used. I threw it at him."When I threw the bicycle at him he left the child and started running after me. I ran but I later fell down. When I got up I found out he had cut the second child."The victims' parents also gave evidence, describing their last morning with their children before taking them to kindergarten, the phone call informing them of the attack and the discovery of the bodies at the hospital.One of Onyum’s lawyers had argued that he should be acquitted because he had long been mentally unstable and had been committed to a psychiatric hospital."I have no doubt in my mind that the search for 'ISIS beheading' prepared the accused person to launch this fatal attack," Judge Alice Komuhangi Khaukha said while delivering the sentence.She rejected his lawyer's assertion that Onyum was insane, saying that his attack, which took less than seven minutes, had been carefully planned.Onyum was seen laughing in the dock during his trial, which his lawyer said showed he was mentally ill.Although Uganda still hands down the death penalty for serious offences such as murder, the last execution was carried out roughly two decades ago.