JENA, La. (AP) — A black teenager whose prosecution in the beating of a white classmate led to one of the largest civil rights protests in years pleaded guilty Monday to a battery charge.

Mychal Bell, 17, originally was charged as an adult with attempted murder in the beating of Justin Barker in December 2006. That charge was reduced before a jury convicted him in June of aggravated second-degree battery. An appeals court threw that verdict out in September and ordered Bell retried as a juvenile.

Under his deal, Bell pleaded guilty to a juvenile charge of second-degree battery in return for an 18-month sentence, with credit for 10 months he already has served. Bell had faced being placed in a juvenile facility until his 21st birthday.

Bell also must pay court costs plus $935 to Barker's family, testify should his co-defendants in the Barker attack stand trial, undergo counseling and be reintegrated into the school system, his lawyers said.

"We were prepared to go forward with the trial, but you have to do what's best for the client," said Carol Powell Lexing, one of Bell's attorneys. A juvenile court trial was to begin later this week.

The charges against Bell and five other black students, who became known as the "Jena Six," led to a civil-rights demonstration in Jena in September. Felony charges against the other students are pending.