A 12-year-old suspected of shooting and killing a classmate and wounding two girls at a school in Finland said he had been motivated by bullying, police said Wednesday.

Flags flew at half-staff as the northern European country observed a day of mourning a day after the boy opened fire in a classroom in Vantaa.

“The suspect has told the police during interrogations that he has been the victim of bullying, and this information has also been confirmed in the police’s preliminary investigation,” police said in a statement.

Police also said that the young suspect had been a student at the school only since the beginning of the year.

They said their investigation showed that he had threatened other students on their way to the school.

According to Finnish broadcaster MTV Uutiset, the boy wore a mask and noise-canceling headphones when he carried out the shooting.

The child who was killed, a Finnish boy also age 12, died at the scene, and the suspect had already fled the school by the time police arrived.

The police opened an investigation into murder and attempted murder but said the suspect has been handed over to social services as he could not be held in police custody because of his age.

The revolver-like gun used in the shooting belonged to a close relative of the boy, they said.