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 misdemeanor battery charge that could see him released from a detention center in about eight months.

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.

LaSalle Parish District Attorney Reed Walters said he was pleased with the deal "because Mr. Barker is beginning to get the restitution and compensation he's due."

Walters said he would try to work out plea deals with the other teens charged in Barker's beating. He said his decision to work out a deal was not influenced by the intense media coverage and civil rights demonstrations.

Barker spent several hours in the emergency room after the attack but was discharged and attended a school event the night after the attack, which occurred about a year ago.

Critics said prosecutors have treated blacks more harshly than whites in LaSalle Parish, pointing to an incident three months before the attack on Barker in which three white teens were accused of hanging nooses from a tree at the high school. The three were suspended from school but never criminally charged.

Walters has said there was no state crime to charge them with.