A teenager killed his father before going to a nearby primary school and opening fire with a handgun, wounding two students and a teacher, police say.
The suspect was arrested after wounding two boys and a female teacher at Townville Elementary School in South Carolina.
One child was shot in the leg and the other in the foot, while the teacher was hit in the shoulder, said police.
Officials say there is no evidence the attack was tied to terrorism or racism.
Capt Garland Major said the the unnamed suspect first gunned down his 47-year-old father, Jeffrey Osborne, at their home.
He then made his way about two miles to the school at 13:00 local time (17:00 GMT), according to local media.
Anderson County school district 4 superintendent Joanne Avery told a news conference that school officials are “heartbroken about this senseless act of violence”.
SWAT teams searched the school, which has some 300 students, and confirmed that no threats remain.
Nearby schools were placed on “Code Yellow”, meaning that lessons continued but nobody was allowed into the buildings.
All the students were transported to a nearby church, where they were reunited with their parents.
Parents received a text alert from the school district informing them of the shooting, and telling them where to pick up their kids.
The traffic queue of mothers and fathers picking up their children was reportedly nearly a mile long.
Shootings in the last week
- A man in the state of Washington opened fire at a shopping mall, killing four people
- Nine people hurt when man dressed in military uniform and Nazi emblems opened fire in Houston
- A man opened fire at the University of Illinois, killing one and injuring four