A 17-year-old Chicago boy was allegedly caught with a loaded gun during a curfew arrest early Wednesday in north suburban Waukegan.

Officers on patrol about 2 a.m. saw a vehicle parked illegally with multiple people inside in front of an apartment complex in the 2400 block of Dugdale Road, according to Waukegan police. When officers approached the car, they discovered that one of the occupants was a 17-year-old boy from Chicago.

The boy was taken into custody for a curfew violation, police said. He told investigators he came to Waukegan with friends to see someone who lives in the apartment complex. While officers were searching him, they found a loaded .38-caliber revolver.

He was charged with violating curfew, obstruction, and unlawful possession of a firearm, police said. He has been turned over to the Lake County Juvenile Detention Center in Vernon Hills.