A man was shot in the forearm with a nail gun over a traffic dispute Tuesday afternoon in northwest suburban Woodstock.

Officers responded about 3 p.m. to the area of Route 47 and County Club Road after a report of a fight between two men in traffic, according to a statement from Woodstock police.

Upon arrival, officers found a 49-year-old man who had been shot in the forearm with a battery-operated nail gun, police said. The man had been shot following the escalation of a traffic dispute.

Bret T. Eder, 22, of Wonder Lake, shot the 49-year-old with the nail gun after the man threw a bottle out of his car window and struck Eder’s car, police said. The man who was shot then got out of his car and the two began to fight.

The victim was treated at the scene and released, police said.

Eder was charged with a felony count of aggravated battery and a misdemeanor count of reckless conduct. He was taken to the McHenry County Adult Correctional Facility, where he was in custody Wednesday afternoon.