A man in Rockford, IL, has been arrested for pointing a BB gun at a police officer earlier this week.

According to WREX-TV, police say the officer was off duty and in full uniform walking down a sidewalk following a court appearance when he saw a person in a vehicle slow and point a gun at him before fleeing.

Officers later conducted a traffic stop on a vehicle based on the officer's description and arrested 20-year-old Dawson Ranz. During the stop, officers located a BB gun and a box of ammunition.

Ranz was charged with aggravated assault to a police officer and unlawful use of a weapon (possession of ammunition).