A former elementary school teacher pleaded guilty Friday to having sex with an 11-year-old student and was sentenced to 10 years in prison, a prosecutor said.

Wendie Ann Schweikert, 37, was arrested in May 2006 and charged with criminal sexual conduct with a minor and committing a lewd act on a minor. The case inflamed racial tensions because the student is black, and some black residents had argued that the teacher was getting lenient treatment by the courts.

She pleaded guilty and read a three-page apology to the victim, his family, E.B. Morse Elementary School and the community, Laurens County prosecutor Jerry Peace said.

Peace said that he offered a plea deal that would have recommended 14 years in prison for the former fifth-grade teacher, but that she refused and decided to take her chances with the judge.

"It's not an inappropriate sentence," Peace said. "I respect the judge's decision."

A phone message left for Schweikert's attorney, Chip Howe, was not immediately returned.

The boy's family was satisfied with the sentence, Peace said.

Some black residents were upset by the handling of the case and another involving a white teacher and black student, particularly the release of the teachers on bail. They said the cases show how crimes by whites against blacks are treated less seriously than other offenses.