A 39-year-old man charged in the murder of a 9-year-old Chicago boy was "hunting" for someone to shoot, prosecutors said Tuesday.

Darrell Johnson was arrested Sunday in the city's South Side for the death of Janari Ricks, an honor roll student who was slated to begin the fourth grade. Authorities said Ricks was playing with friends in a courtyard Friday near the Cabrini-Green housing project when Johnson fired six shots from a nearby alley.

Ricks, who police say was not the intended target, was struck in the back and arm and pronounced dead at a hospital, the Chicago Sun-Times reported.

“According to the video, he’s walking down that alley looking for somebody to shoot [and] clearly saw the group of people, including children, that were out there in that courtyard," said Assistant State’s Attorney James Murphy

NUMBER OF CHICAGO SHOOTING VICTIMS UNDER 10 YEARS OLD TRIPLES FROM LAST YEAR

Darrell Johnson, 39, is accused of fatally shooting 9-year-old  Janari Ricks in Chicago last week. (Chicago Police Department )

Steve Greenberg, Johnson's attorney, said in a tweet that his client has been wrongfully charged.

"We are going to be representing Darrel Johnson, who is the wrong person to be charged with the unfortunate shooting of a nine year old," he wrote.

Witnesses identified Johnson as the shooter from surveillance video that captured his face as he walked out of the alley, prosecutors said.

In a Monday news conference, authorities credited the community with helping to apprehend Johnson. Since June 20, 15 children have been shot in the city, the newspaper reported.

CLICK HERE TO GET THE FOX NEWS APP

"We're certainly not satisfied with the level of communities coming forward but I just want to emphasize this is the best example of a community coming forward, Chicago police Supt. David Brown said.