(CNN) The start of the school day seemed so routine. Children played in the quad while parents dropped off other students. At Rancho Tehama Elementary, a tiny school in a remote area of Northern California, the bell was just minutes away.

A gunshot Tuesday morning shattered that daily ritual.

Those in the main office heard two more shots, apparently coming from near the campus.

The school immediately went into lockdown. Teachers and staff members hurried the children into classrooms and the office.

Their quick thinking -- with only seconds to spare and reinforced by numerous previous drills -- averted disaster when a gunman opened fire on school grounds, the district's superintendent said.

Kevin Neal

"Evil was overcome by preparation and unconditional love and selflessness," Superintendent Richard Fitzpatrick told reporters Wednesday afternoon. "The lockdown procedure was implemented flawlessly."

Heroes abounded, Fitzpatrick said. Among them was the school's secretary, who hustled students at the front entrance to safety and stayed in phone contact with the Corning Union Elementary School District superintendent and monitored classrooms.

A custodian helping other children get into classrooms drew the shooter's attention and gunfire as the lockdown was being completed. The doors were locked only eight to 10 seconds before the gunman raced into the quad, looking for targets.

The gunman, identified as Kevin Neal, was in the middle of a rampage that killed four people before he was killed by police officers. The body of his wife was discovered later at their home.

While the community was in mourning for those who died, authorities re-emphasized that it could have been much, much worse if Neal had been able to get into the four classrooms, which held fewer than 100 pupils.

As it was, rounds pierced the wall and wounded one young student in the chest and foot. The child was in fair condition. Others were hit by flying glass.

"It is monumental that that school went on lockdown," said Tehama County Assistant Sheriff Phil Johnston. "I truly believe that we would have had a horrific bloodbath in that school if that school had not taken that action when they did."

Women embrace outside Rancho Tehama Elementary School following Tuesday's incident.

The importance of school drills

Authorities said the gunman, after wounding a student and parent in a car, crashed his pickup truck through a school gate. He was having problems with operating his weapon.

He was on campus for about six minutes, trying several doors, but unable to gain entry. Children hid under desks as gunfire continued. Officials said there was no known connection between the shooter and anyone at the school.

"He hit multiple buildings," riddling them with bullets, Fitzpatrick said. "The whole school was sprayed with gunfire."

Neal was able to find an open bathroom door, but no students were present. In frustration, he reloaded and fired into some woods, Fitzpatrick said. He ran to his truck and drove off to continue his rampage.

Before police shot him dead, Neal injured at least 10 in a string of shootings that spanned at least seven sites in the small community of Rancho Tehama, west of Corning, police said.

Employees in the school district have been doing active shooter drills for years, officials said.

"I urge all schools to practice these drills," said Johnston, the assistant sheriff. "We live in an age where we just don't know ... Deranged people target these children."

Two-thirds of schools in the United States conduct active shooter exercises, and nearly all of them have a plan if a shooter comes into the school, the Government Accountability Office found in a recent survey of schools.

Through training programs such as ALICE -- Alert, lockdown, inform, counter and evacuate -- teachers are learning how to barricade doors with desks and chairs, run away from gunfire and throw everything from pencils to staplers at a potential shooter.

Fitzpatrick said Tuesday's incident was every educator's nightmare. And while one child was shot, the school persevered, he said. Classes will resume after the Thanksgiving break.

"Everything ... remains possible for them in the future," he said of the students.