Three children and a teacher were killed in a shooting at an American elementary school

Police said the suspect was killed by a member of the community who followed him into the Oregon school.

A 16-year-old teenager shot dead three children and an elementary school teacher in the US state of Oregon before being killed by passers-by, US police said.

Bend Police Chief Mike Krantz said the suspect, who has not been named, entered Silver Rail Elementary School in Bend Thursday afternoon by shooting through the locked doors.

The teenager was shot and killed by a member of the community who "followed her to school and engaged her," Krantz said.

The three children killed were five, eight and 11 years old. A seven-year-old teacher and a 54-year-old teacher were taken to the hospital in critical condition, Krantz said. It is not known if the attacker had any connection with the school or not.

"We are stunned and heartbroken by this senseless tragedy," Steven Cook, the local school district's chief administrative officer, said in a statement.

"No words can express the sadness our community is experiencing."

Police said the attacker was a 16-year-old local boy, but did not release further details about him or the identities of the victims.

Bend Police Department spokeswoman Sheila Miller told reporters that police were notified of an active shooter at Silver Rail Elementary at 12:59 p.m. local time (04:59 BST).

Police said the first call came from a person who said an unknown suspect was shooting at their vehicle with a long gun. Photos released from the scene show a red truck with bullet holes.

Minutes later, local county dispatch received a 911 call reporting that an assailant had entered the school.

Police said he shot the door locks to force his way inside.

Local media reports suggest the school will receive new classroom doors in 2022 that can be locked with the flip of a switch.

A bystander saw the shooting start, chased the attacker into the school and shot him dead, police said.

Three minutes later, the officers first arrived at the scene. They confirmed that the attacker was killed and then searched the school.

City schools are closed on Friday. Officials said the community needs time to heal.

About 450 children attend Silver Rail Elementary School, which has more than 40 adult staff members, police said.

According to the K-12 School Shooting Database, there were 235 school shootings in America last year and at least 140 this year.