Christopher Okello was sentenced to death on Thursday by a Ugandan judge after the court rejected his plea that he was not mentally well at the time of the April 2 machete attack that killed four children at a nursery school in a Kampala suburb. During the hearing, a crowd outside the tented courtroom erupted in cheers after the judge handed down the sentence.

In delivering the ruling, the judge said Okello “failed to adduce any evidence to support this claim that he was not mentally okay” when he committed the crimes. The court also rejected the defendant’s attempt to frame his actions through an insanity defense.

Court proceedings took place in a highly public setting under a system known as “mobile courts,” which Ugandan President Yoweri Museveni ordered used to fast-track the criminal trial. The arrangement involved open-air hearings that drew hundreds of bereaved locals and other spectators to watch as the case was heard and decided.

Witnesses told the court that the attacker targeted the nursery school — the Gaba Early Childhood Development Program — by disguising himself as a parent. They said he spoke briefly with administrators before locking the gate and attacking the children inside.

Although the judge rejected the insanity plea, the trial featured concerns raised about Okello’s mental health. He appeared nervous during parts of the proceedings and, at times, laughed without provocation, according to the description of events in court coverage.

The Uganda Law Society criticized the trial format, describing it as “a judicial lynching rally.” The judiciary, however, defended holding a quick and public proceeding, saying it demonstrated its “commitment to taking justice closer to the people through innovative approaches.”

The death penalty is rarely carried out in Uganda, where many people condemned to death can spend years in prison before execution. The sentencing in this case has therefore fueled continued scrutiny over the country’s use of capital punishment, as well as over how mental-health defenses are handled in urgent, high-visibility court processes.