Charleston County sheriff’s deputies are investigating an alleged sexual relationship between a former West Ashley High School teacher and a student.

The school’s principal alerted a school resource officer to a relationship between a 26-year-old male teacher and an 18-year-old female student, a Charleston police report states.

Sheriff’s deputies were notified and are investigating the allegations, Maj. Jim Brady said.

The relationship has been going on for months and appears to be consensual, Brady said.

Under South Carolina’s sexual battery law, it is illegal for a teacher to have sex with a high school student enrolled at the school. The penalty varies depending on the student’s age, whether the teacher had direct supervisory authority over the student, and whether the student was coerced into having sex.

Charleston County School District spokesman Jason Sakran said the teacher is no longer employed at the school. The district will not comment further on the incident because the situation is a personnel matter, he said.