Police say a Hayward man walking his dogs with his 13-year-old daughter was fatally shot after one of the dogs sniffed the gunman's leg.

Thirty-eight-year-old Thomas Cunningham died at Eden Medical Center in Castro Valley after the shooting outside a Hayward liquor store Tuesday night.

Police say the gunman asked Cunningham to hold his dogs back and objected when one of them — a German shepherd — sniffed his leg. Cunningham was just leaving the liquor store, where he had bought ice cream for his daughter.

The suspect then exchanged words with Cunningham before pulling a handgun, shooting him and running off.

Police say the dogs were unleashed but were not behaving aggressively. They have a description of the suspect but have yet to identify him.