EASLEY — A Pickens County high school teacher has resigned after being accused of having sex with a student.

Liberty police say 31-year-old John Kilgallen turned himself in Thursday afternoon.

School district officials say the Easley High School science teacher was put on leave Tuesday after a parent reported Kilgallen had sex with a 17-year-old student at the teacher’s home in Liberty.

Investigators said the relationship started at the beginning of this school year.

Kilgallen is charged with sexual battery with a student. He was released on bond Thursday and faces up to five years in prison if convicted. It wasn’t known if he had an attorney.