A white supremacist who goes by the nickname "Hitler" pleaded guilty Wednesday in the unprovoked beating of a black fisherman in a Baltimore park.

Calvin E. Lockner, 29, agreed to a 31-year prison term and will be sentenced Monday, said Joseph Sviatko, a spokesman for the Baltimore state's attorney's office. He pleaded guilty to charges including armed carjacking and first-degree assault.

Lockner and two teenagers beat James Privott, 77, and stole his car in August 2009 while he was fishing, according to police and prosecutors. Privott was beaten with a baseball bat and suffered a broken eye socket and lost two teeth. One of his attackers yelled racial slurs, and Lockner told police the attack wouldn't have happened if Privott had been white.

Lockner belongs to white supremacist groups and has a tattoo of Adolf Hitler on his midsection, and police said the Nazi leader's was his nickname.

He's also a convicted sex offender who has spent most of his adult life in prison. He was charged in 2000 with raping a 38-year-old woman and a 4-year-old girl, and received an 8-year sentence after a plea deal.

Lockner's public defender, Audre Davis, did not return a message seeking comment.

Lockner also pleaded guilty to assaulting a correctional officer in May. According to prosecutors, he threw a cup of urine in the officer's face. That plea accounts for the final year of his 31-year sentence.

His sentencing was delayed until Monday to give Privott and the correctional officer the opportunity to speak in court, Sviatko said.

Monday is also the trial date for Lockner's 18-year-old co-defendant, Zachary Watson, who faces similar charges. Watson's case will likely be postponed because his attorney is in trial on another matter. A second teen, Emmanuel Miller, had his case sent to juvenile court.