San Diego - A man opened fire immediately on a San Diego police officer who walked up to him on a dark residential street last week to ask if he lived nearby, prosecutors say, then shot into a patrol car, hitting the officer's partner with five bullets as he sat wearing a seat belt.Jesse Gomez - a construction worker with two felony convictions - pleaded not guilty to murder and attempted murder charges at a hospital where he is recovering from wounds sustained in the gun battle with police.Fired multiple timesDeputy District Attorney Michael Runyon said at a news conference that Gomez and another man had been walking about 23:00 on Thursday and split up as the officers came into view. The two officers pulled up to Gomez and Officer Wade Irwin got out and asked if he lived in the area.Gomez "answered with gunfire," Runyon said, striking Irwin in the throat.As Irwin fell down, he saw Gomez walk toward the open passenger door and fire multiple times into the patrol car, where Officer Jonathan DeGuzman sat in the driver's seat, Runyon said.The fatal bullet went through both of DeGuzman's lungs and severed his spine, Runyon said.After being shot in the throat, Irwin fired back as Gomez fled, Runyon said. Police later found Gomez by following a trail of blood to a ravine. He was unconscious with an empty holster and police found a firearm, magazine and matching ammunition in the ravine, according to investigators.Police have not determined a motive for the killing. They say they have not ruled out that the officers were targeted as in other cases across the country."We are all still shaken by this cold-blooded murder," District Attorney Bonnie Dumanis said. "An assault on a peace officer is an assault on our community."Police arrested a second man on an unrelated warrant and who fit the description of the person walking with Gomez, Runyon said. Officials declined to say whether he is still a person of interest. He posted bail and has been released.Camera footageGomez, 52, would be eligible for the death penalty if convicted, but prosecutors have not decided whether to seek it. Bail was set at $5m.DeGuzman, 43, was a 16-year veteran on the force with a wife and two children.Investigators have reviewed police body camera footage, though they said at the news conference that Irwin's camera was not turned on until after he was shot.Irwin, 32, picked Gomez from a six-person photo line-up after undergoing surgery, authorities said.Officials have released little information about Gomez. He has a criminal record stretching back to 1983, including a conviction for auto theft and drunken driving.