ROCK HILL — A former teacher has been sentenced to three years in prison after admitting improperly touching a 12-year-old female student.

The Herald of Rock Hill reports Thursday that 36-year-old Jonathan Jens of Fort Mill pleaded guilty to assault and battery. He also must register as a sex offender. South Carolina had already revoked his teaching license.

The former Indian Land Middle School teacher and boys basketball coach was charged June 1 with three felony counts of performing a lewd act on a child.

His arrest at the school came days after the victim’s mother found text messages and letters between Jens and her daughter.

The family’s attorney, Harold Staley, said the family agreed to the plea deal to avoid a trial.