Santa Barbara County Sheriff’s deputies arrested a man on suspicion of discharging a firearm with gross negligence after a shooting seriously injured a man in Montecito Wednesday morning.

Deputies responded to reports of gunshots near the 400 block of Woodley Road at 11:53 a.m., along with fire medics, and found a man with a gunshot wound to his upper arm.

The man was walking his dog when he was shot, according to Raquel Zick, public information officer for the Santa Barbara County Sheriff’s Office.

Deputies determined the bullet came from inside a nearby residence because of a bullet hole in a window facing the direction of the victim, Zick said. Deputies detained the resident of that home, Bendar Albashir, 44, who was rendering aid to the victim, she said.

It appears that the victim and the Albashir do not know each other, the Sheriff’s Office said. The incident is still under investigation.

The victim was transported to the hospital and is expected to recover, Zick said.

Albashir was booked into the Santa Barbara County Main Jail on suspicion of discharge of a firearm with gross negligence. He was released on bail as of Thursday morning.

Detectives served a warrant at Albashir’s home and recovered the handgun they believe was used in the shooting, Zick said.

No further information was available.