DEWITT, N.Y. (AP) — Authorities say they've arrested a man on drug charges after a police detective conducting surveillance of his suburban Syracuse apartment was shot at by two gunmen.

The Onondaga County Sheriff's Office says a 31-year-old man living at the apartment complex in the town of DeWitt was charged Tuesday with selling and possessing narcotics.

The arrest came a day after authorities say a sheriff's detective was fired upon as he sat in his unmarked car while it was parked at the Springfield Garden Apartments as police conducted a drug surveillance operation.

Authorities say the bullets narrowly missed the detective but he was injured by shattered glass. He was treated for minor injuries at a hospital.

Police are still searching for the two gunmen.

The drug suspect is being held in the county lockup.