(CNN) A juvenile is a primary suspect in the shooting of a 7-year-old trick-or-treater in Chicago that left the girl in critical condition, a police spokesman said.

Detectives also recovered a firearm that may be connected to the shooting, Chicago police chief communications officer Anthony Guglielmi said via Twitter.

"Criminal charges pending. Excellent work by detectives & prosecutors. We could have not gotten here without the help of the #LitfleVillage community," Guglielmi tweeted on Friday evening.

The juvenile was taken in for questioning earlier Friday.

The girl, dressed as a bumble bee, was out with her family around 5:30 p.m. Thursday in the Little Village neighborhood when a group of men chasing another man began shooting, Chicago police Sgt. Rocco Alioto told reporters.

Read More