Joliet police responded to the 500-block of Silver Falls Street about 10:55 a.m. for a report of a robbery.
A male suspect had approached two 17-year-old girls, who were sitting in a car parked in the area, and held a gun to one of the girl's necks, while demanding her purse, police said.
The suspect grabbed her purse and the keys to the vehicle, police said. The driver was able to take the keys back at some point, according to police.
A gunshot was fired during a struggle, but no one was injured.
SEE ALSO: Chicago murder suspect, Cary woman charged after hours-long Lake Barrington manhunt
The girls chased the suspect as he ran east through the neighborhood.
Two 17-year-old boys were arrested in connection to the armed robbery shortly after the crime, police said.
Police later located a residence in the 600-block of Silver Creek Drive where the primary armed robbery suspect was believed to be located. A different 17-year-old boy exited the residence and attempted to flee police, but he was arrested.
The primary robbery suspect, who is also a 17-year-old boy, was also arrested shortly afterwards, police said. He has been charged with Armed Robbery and Aggravated Discharge of a Firearm.
Residents in the area of the 500-block of Silver Falls Street were asked to shelter in place about 11:30 a.m., while police searched for him.
Troy Heritage School was also notified.
The shelter-in-place order was lifted about two hours later, after police said the "immediate threat to the area has alleviated."
Four 17-year-old boys are in custody, with more possible charges pending, police said.
Anyone with video footage or information related to the shooting is encouraged to contact the Joliet Police Department Investigation Division at (815)724-3020.
They can also contact Will County Crime Stoppers at 800-323-6734 or online at crimestoppersofwillcounty.org, if they wish to remain anonymous.