The teacher, who has not been named, threw her mobile phone and attempted to disarm the teenager on the classroom floor. Bend Police Chief Mike Krantz said her actions "almost certainly helped prevent more bloodshed." The teacher was not hurt.
The suspect, identified as Griffin J John II, a former student at the school, fired as many as 15 rounds in the classroom and was armed with about 44 more rounds of shotgun ammunition when he was stopped, police said. His motive remains unclear.
A 36-year-old carpenter, identified by US media as Kaylub Giamanco, was driving past the school when he saw the suspect open fire on a vehicle and shoot through a window to gain entry. Armed with a pistol, he ran in and fatally shot the suspect, police confirmed.
Police named two of the four victims: five-year-old Rhoam Summer and 25-year-old teacher Meghan Lambert. Lambert's family described her as "compassionate and had a huge heart" and said she always fought for the underdog and those with special needs. Rhoam's grandfather, Bryan Jolly, told the New York Times the death was "senseless" and described his grandson as "very bright and very mischievous."
The families of the two other students killed, an eight-year-old and an 11-year-old, have asked not to be publicly identified, police said. A 54-year-old teacher remains in hospital, and a seven-year-old student is in serious but stable condition.
Police Chief Krantz praised the heroism of both the teacher and the father, saying they had saved lives. A search warrant has been executed at the suspect's home, and authorities are investigating how he acquired the gun and his exact movements before the attack.