Follow CBSDFW.COM: Facebook | Twitter

TOWNVILLE, South Carolina (AP) – A teenager killed his father at his home Wednesday before going to a nearby elementary school and opening fire with a handgun, wounding two students and a teacher, authorities said.

The teen was apprehended within minutes of the school shooting in this rural town about 110 miles northeast of Atlanta. One of the students was shot in the leg and the other in the foot, Capt. Garland Major with the Anderson County sheriff’s office said. Both students were male. The female teacher was hit in the shoulder.

Before the shooting at Townville Elementary around 1:45 p.m., the teen gunned down his 47-year-old father at their home about 2 miles from the school, authorities said.

“We are heartbroken about this senseless act of violence,” said Joanne Avery, superintendent of Anderson County School District 4. She canceled classes for the rest of the week.

Anderson County emergency services director Taylor Jones said all other students at the Townville Elementary School were safe following the shooting. The students were bused to a nearby church and reunited with their parents. They hugged and kissed one another.

Jamie Meredith, a student’s mother, said some of the children went into a bathroom 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 5 minutes when I got her,” she told WYFF.

Television images showed officers swarming the school. Some were on top of the roof while others were walking around the building. Students were driven away on buses accompanied by police officers.

All of the roads to the school were blocked off. The school is in a very rural part of the state and surrounded by working farms.

Gov. Nikki Haley released a statement shortly after the shooting.

“As we work together with law enforcement to make sure they have the support they need to investigate what happened in Townville, Michael 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.”

Townville Elementary had about 300 students in its pre-kindergarten to sixth-grade classrooms last year, according to its annual state report card last spring.

The rural town is located along Interstate 85 near the Georgia-South Carolina state line.

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)