An black 18-year-old suspected of a violent attack on a white teen told Chicago police the beating was motivated by his anger over the Trayvon Martin case in Florida, MyFoxChicago reports.

Alton Hayes III was charged with a hate crime after he and a 15-year-old attacked the 19-year-old man at about 1:00 a.m. on April 17 in Oak Park, a Chicago suburb.

Police say Hayes and his teenage partner, who has not been named since he is a juvenile, picked the man apparently at random and pinned his arms to the side.

Hayes allegedly then picked up a tree branch and demanded the victim give them his belongings, saying, "Empty your pockets, white boy."

The suspects then rifled through the victim's pockets, threw him to the ground and punched him numerous times in the head and back. Both suspects are black and the victim is white, according to police.

MyFoxChicago reports Hayes told police he decided to attack his victim because he is angry over the death of Trayvon Martin. Hayes said he chose his victim because he is white.

Hayes was charged with attempted robbery, aggravated battery and a hate crime, all felonies. His teenage comrade was referred to juvenile court.

Trayvon Martin, 17, is the unarmed black teenager who was fatally shot as he walked through a gated community in Sanford, Fla. on Feb. 26. George Zimmerman, who has been charged with second-degree murder, went into hiding Monday as he awaits trial.

Emotions have run high across the US over the incident, in large part because six weeks passed before Zimmerman was charged -- leading many African-American community leaders to decry what they perceived as racism in the justice system.

On Saturday night, a white man was beaten by a throng of African-Americans in Mobile, Ala., after telling a group of children to stop playing basketball in the middle of a street -- with one witness claiming she heard an assailant exclaim, "Now that's justice for Trayvon," WKRG -TV reported.

However, the Mobile Police Department said the assault on Matthew Owens, 40, was not being investigated as a hate crime.

Click here for more on this story from MyFoxChicago.com.

Newscore contributed to this report.