A gunman accused of firing at Los Angeles police and wounding a search dog during a gun battle has been charged with 19 counts of attempted murder on officers as well as other charges, prosecutors said Wednesday.

Jose Rauda, 34, faces 27 additional counts of assault with a firearm on a peace officer, assault with a firearm, assaulting a police animal causing injury, and possession of a firearm by a felon, in connection with the June 15 shootout, reports the Los Angeles Times.

According to police, officers were about to launch a probation search about 7 p.m. when they came under fire from someone inside a house.

Police returned fire and saw Rauda run off, Los Angeles County prosecutors said in a news release.

Two hours later, a K-9 searching for Rauda near a trash can in a backyard was shot in its hind leg. Before officers arrived, the shooter fled, officials said.

Around midnight police found Rauda hiding in a laundry room behind a nearby house, prosecutors said. When officers closed in, Rauda opened fire, police said, adding that one officer’s helmet was grazed by a bullet.