Updated

An East Texas kindergarten teacher who had sex with at least six high school students accepted a plea deal Thursday that will require her to spend 10 years in a state prison.

As part of the agreement, 39-year-old Heather Lee Robertson will be required to surrender her teaching certification and register as a sex offender for the rest of her life.

Robertson was facing six charges of sexual assault of a child and six counts of having an improper relationship with a student. She would have faced up to 240 years in prison if convicted on all counts.

"Teachers are entrusted with our most valuable and most precious asset every day," Angelina County Assistant District Attorney Todd Dillon said in a statement. "When teachers betray that trust in Angelina County, they will be held accountable for that betrayal, and they will face significant punishment."

Prosecutors say Robertson had sex with the students between November of last year and this past February, with the first encounter taking place shortly after her husband filed for divorce. Robertson told a police officer for the Hudson Intermediate School District that she had started drinking heavily and would not be able to remember details of the encounters.

According to court documents, Robertson initiated the encounters by contacting the victims on Snapchat.

On one occasion this past November, a student convinced his parents to drop him off at Robertson's apartment so he could help her move furniture. Instead, court documents say, Robertson and the student had sex before Robertson took him home.

Click for more from KTRE.com.