A teenager killed his father at their South Carolina home before going to a nearby primary school and opening fire with a handgun, wounding two pupils and a teacher.
The youth, who is reported to be 14, gunned down his 47-year-old father, Jeffrey Osborne, at their home about two miles from the school.
Then at about 1.45pm local time on Wednesday he shot one of the the pupils in the leg and the other in the foot, before hitting a female teacher in the shoulder.
The teenager was prevented from entering Townville Elementary by veteran firefighter Jamie Brock, who also stopped him escaping.
The shooting has shocked the rural town, which is about 110 miles from Atlanta.
"We are heartbroken about this senseless act of violence," said Joanne Avery, superintendent of Anderson County School District 4. She cancelled classes for the rest of the week.
One of the pupils and the teacher have been released from hospital, while Jacob Hall, who is reported to be aged six, remained in a critical condition in Greenville, where he was flown after the shooting.
His parents, Rodger and Renae Hall, said they appreciated the community's support, especially the emergency responders who treated Jacob and took him to the hospital, and asked for privacy.
Anderson County Coroner Greg Shore said the teenager called his grandmother's mobile phone at 1.44pm on Wednesday, but he was so upset, she could not understand him.
The grandparents went to his home just 100 yards away and found Jeffrey Osborne shot.
The authorities say a teacher called 911 about a shooter at Townville Elementary about a minute after the teen phoned his grandmother.
The school has about 300 students. It is in a very rural part of the state and surrounded by working farms.
The authorities did not release a motive for the shooting and said they were not sure if the students and teacher were targeted.
Governor Nikki Haley said: "As we work together with law enforcement to make sure they have the support they need to investigate what happened in Townville, Michael (Haley) and I ask that everyone across South Carolina join us in praying for the entire Townville Elementary School family and those touched by today's tragedy."
Jamie Meredith, a student’s mother, said some of the children went into the toilets during the shooting.
“I don’t know how they knew to go in the bathroom, but I know her teacher was shaken up. I know all the kids were scared. There was a bunch of kids crying. She didn’t talk for about five minutes when I got her,” she told WYFF.
Television images showed officers swarming the school.
The school is in a very rural part of the state and surrounded by working farms, located about 110 miles north east of Atlanta. According to its annual report Townville Elementary had about 300 students last year.