HOUSTON -

A teacher accused of sexually assaulting a student has agreed to a plea deal.

Andre Thomas, 32, was charged with aggravated sexual assault of a child. He agreed to plead guilty in exchange for a sentence of 180 days in jail, 10 years probation and a $1,000 fine.

Thomas was a teacher at Roberson Middle School in the Spring Independent School District. He taught sixth- and seventh-grade industrial technology classes.

Prosecutors said Thomas raped a 13-year-old female student in a classroom in August 2011. According to court documents, the investigation began two and a half months later, after suspicious cellphone records surfaced showing inappropriate text messages between Thomas and another student.

"She was interviewed as another child that might have known about the other child's cellphone, and, when she was interviewed, she disclosed about the sexual abuse," prosecutor Denise Oncken said.

If he had gone to trial and been convicted, Thomas could have faced 5 to 99 years or life in prison.