SAN MARCOS, Texas — A San Marcos High School teacher accused of having an inappropriate relationship with a student has turned himself in to authorities.

On Jan. 24 at approximately 6:25 p.m., a San Marcos police officer was dispatched to San Marcos High School for a report of an inappropriate relationship between a student and a teacher.

The school's athletic director and assistant principal told the officer that two students informed a coach of an inappropriate relationship between 27-year-old Ian Michael Madden — a boys basketball coach and history/government teacher — and a 17-year-old female student. 

Once notified, SMCISD started an investigation and contacted the police. During the investigation and forensic interview, the student said she and Madden had had sex several times over a period of two months. 

In a separate interview, Madden also admitted he and the student had had sex. 

Text messages and photos of the two were located on the student's phone, which was seized as part of the investigation.

Madden was suspended from employment on Jan. 25. 

A warrant was issued for his arrest on Feb. 15. He turned himself in to Travis County authorities as of 3:45 p.m. on Feb. 22.

Madden has retained an attorney.

An inappropriate relationship between a student and a teacher is a second-degree felony.