A 16-year-old gunman opened fire at an elementary school in Bend, Oregon, on Thursday, killing three children and a teacher before he was shot by a person at the scene who pursued him into the school, authorities said.

Bend Police Chief Mike Krantz said the children killed were aged 5, 8 and 11. Another child, aged 7, and a teacher, aged 54, were taken to hospital in critical condition. The first 911 call came just before 1 p.m. from a person in a vehicle outside Silver Rail Elementary who reported being shot at by someone with a long gun, and further calls followed from inside the school as officers arrived within minutes.

Police said the attacker, a Bend resident, forced his way in by shooting at locked doors and was found dead inside the school. A law enforcement official briefed on the investigation told the Associated Press the weapon was a pump-action shotgun purchased by his mother. Police said they did not yet know whether the attacker knew anyone at the school.

Silver Rail Elementary serves kindergarten through Grade 5 and had 459 enrolled students last year. Families were directed to a reunification site at a local church, and the district superintendent said the immediate priorities were caring for students and staff and assisting responders. The investigation is continuing.