A man killed four children in a machete attack at a nursery school in Kampala, Uganda, police said Thursday, adding that the suspect was later taken into custody. Police said the attacker gained access to the Gaba Early Childhood Development Program by disguising himself as a parent before carrying out the attack inside the school.

The Daily Monitor reported that the suspect first entered the school offices and briefly engaged the administrator in charge. The report said he then stepped outside, locked the gate, and began attacking children inside the school grounds.

In a statement, police said the attacker “brutally stabbed and killed four juveniles.” The report also described how parents reacted after the attack, with local broadcaster NTV airing video footage of parents weeping near the scene.

Police said they fired in the air to disperse an angry crowd that gathered near the school, apparently trying to lynch the suspect. Police spokesman Kituuma Rusoke later told The Associated Press that the suspect was taken into custody.

Rusoke said police did not yet know a motive for the attack. He also said such attacks on children are rare in Kampala, which has a population of roughly 3 million people.