Scott Chandler stood over the lone gunman after he was tackled near the elementary school and yelled: "Why are you shooting kids?"
Chandler, a professional surfer who lives across the street from Kelly Elementary School, never got an answer from the suspect following the shooting around noon Friday.
Police say that minutes earlier suspect had parked his car, jumped a school fence and fired on the playground in the beach community north of San Diego, shooting two students in their right arms.
The students, ages 6 and 7, are expected to make full recoveries, Carlsbad police Lt. Kelly Cain said.
The gunman continued firing rounds as construction workers chased him. At one point, construction worker Carlos Partida told KGTV-TV that he ran to his truck and drove into the gunman to stop him.
"I hit him with my truck," Partida said.
Meanwhile, teachers and school administrators corralled the screaming children into classrooms.
The suspect, Brendan L. O'Rourke, 41, was arrested on suspicion of six counts of attempted murder and numerous weapons violations, Cain said. He is believed to have acted alone.
Cain said he was refusing to answer their questions. Cain said a propane tank was found near his car and a gas canister was also found on the school playground.
He said police do not know what he intended to do or why he opened fire.
"He is possibly a transient who lives in the area," Cain said. "He is not cooperating with the investigation. He probably has some mental health issues."
Parents, like Chandler, shudder to think of what could have happened if the man had not been stopped.
"He had some kind of mission he was on and he didn't complete it," Chandler said.
Chandler was repairing a Jet Ski in his driveway when he heard two loud bangs and saw children running and screaming. He ran downhill in his flip-flops and took cover behind some tall Eucalyptus trees while he called 911. He saw several men struggling on the side of the road.
He approached the crowd after realizing the school's construction workers were pinning down the man. Chandler said he saw bullets fall out of the suspect's pocket.
"I just started yelling him, 'Why are you shooting kids?'" Chandler said. "His face was in the dirt, his teeth were in the dirt, and he just grunted."
Robert Speck, 43, said he raced over to his son's school after hearing the news. He found the school on lockdown. He and scores of other parents waited anxiously for their children in a nearby park.
"It was total panic not knowing what was going on and if our children were OK," Speck, 43, said after reuniting with his son, Kenny.
The 6-year-old said he was not scared but others in his class cried as they listened to the gunshots after running into the classroom for cover.
"I am so grateful to the construction workers," his mother, Tamera Wleklinski, said. "They deserve lunch and free doughnuts for the rest of the year."