Authorities responding to the school. (Mike Ellis/Independent Mail via AP)

Authorities on Wednesday responded to a shooting at an elementary school in South Carolina as well as a related homicide just miles away.

It was not immediately clear precisely where in or around the school gunfire occurred, but local media reports said that at least three people — two students and one teacher — were believed to be injured at Townville Elementary School, located about 40 miles west of Greenville, S.C.

In addition, investigators were also looking into a homicide that they say was tied to the school shooting.

According to Greg Shore, the Anderson County coroner, a person was found dead in their home about two miles from the school. He said this person is “connected to the shooter that went to the school,” but would not elaborate on the relationship between the shooter and the homicide victim other than to say they are related.

“Right now we’re not releasing any details other than it is a relative,” Shore said in an interview while still at the homicide victim’s home. “We just wanna make sure the community knows that this situation is now under control.”

Shore said that he does not believe that the person who was killed is related to any of the three people shot at the school, but added that investigators were pulling the details together.

The Greenville News reported that two children were believed to be shot with non-life-threatening injuries, though authorities have not independently confirmed that to The Post. The newspaper also reported that a suspect was in custody in the shooting.

Another reporter, citing a chief sheriff’s deputy, reported that a teacher was also injured:

The neighboring Oconee County Sheriff’s Office said that at the request of the Anderson County Sheriff’s Office, it sent deputies to respond to a reported active shooter situation at the school at around 1:44 p.m.

“I have spoken with Sheriff John Skipper in Anderson County and have offered to make available any resources and assistance from the Oconee County Sheriff’s Office that he needs as the investigation continues,” Oconee County Sheriff Mike Crenshaw said in a statement.

In live video feeds of the scene, a number of police cars and law enforcement officials could be seen gathered around the school.

An official with the Anderson County Sheriff’s Office said they would be releasing more information about the incident at Townville on Wednesday afternoon.

Townville Elementary School serves about 280 children from preschool through sixth grade, according to state data. About three-quarters of its students are considered economically disadvantaged, meaning they receive Medicaid, food stamp or welfare benefits, are homeless or migrant students or are in foster care, according to the school’s 2015 state report card.

Emma Brown contributed to this report.

[This post, first published at 3:05 p.m., has been updated and will continue to be updated.]

(Google Maps)