Two men have been charged with illegal gun possession and fleeing police in west suburban Elgin.

Kevin Hamilton, 21, is charged with unlawful possession of a weapon and two counts of aggravated unlawful use of a weapon, the Kane County sheriff’s office said in a statement.

Dequan Bailey, 22, is charged with aggravated fleeing, the sheriff’s office said.

They allegedly fled from a sheriff’s deputy in a vehicle with two other people about 8:40 p.m. Sunday near McClean Boulevard and Wing Street, the sheriff’s office said.

A sheriff deputy was patrolling the area and attempted to stop a vehicle for driving without headlights, the sheriff’s office said. The car sped off from the deputy and reach over 50 mph on a residential street.

The deputy terminated the pursuit, but noticed the vehicle stop shortly after, the sheriff’s office said. Sheriff’s police and Elgin police caught up with the vehicle and arrested its four occupants.

Police found a loaded handgun in the front passenger seat during a search of the vehicle, the sheriff’s office said.

Hamilton, of Streamwood, was ordered held on a $60,000 bail, the sheriff’s office said. Bailey, also of Streamwood, was released on a personal recognizance bond.