A suspect has been charged and another potential suspect is in custody in a "gut-wrenching" shooting in San Diego that left one officer dead and another injured, police said.

Jesse Michael Gomez, 52, was charged with murder and attempted in the shooting, police said. The circumstances were not immediately clear.

Another potential suspect, whose name ABC News is wittholding because he has not been charged, was located for an outstanding warrant. It wasn't determined if he was connected to the shooting or not.

It was also not clear if there were additional suspects.

The shooting happened Thursday night after two officers, both assigned to the gang unit, made a stop around 11 p.m. local time. The officers called for emergency cover and were shot multiple times, police said.

The incident happened "very quickly," San Diego Police Chief Shelley Zimmerman said, adding that it was unclear if the officers had been targeted.

The officers were wearing bulletproof vests and body cameras, she said.

A police investigator arrives near the scene where an officer was fatally shot and another was injured at a traffic stop late on Thursday, in San Diego, July 29, 2016.(Mike Blake/Reuters) A police investigator arrives near the scene where an officer was fatally shot and another was injured at a traffic stop late on Thursday, in San Diego, July 29, 2016.

The slain officer, Jonathan DeGuzman, a husband and father of two, was a 16-year police veteran. Zimmerman said he lost his life trying to make a positive difference and protect his community.

The injured officer, Wade Irwin, also a husband and father, is a 9-year veteran. He was hospitalized for surgery. Irwin was expected to make a full recovery, police said.

A police officer helps to secure the scene near the corner of 39th Street and Boston Avenue in San Diego where two San Diego Police officers were shot, July 28, 2016.(John Gastaldo/The San Diego Union-Tribune via AP) A police officer helps to secure the scene near the corner of 39th Street and Boston Avenue in San Diego where two San Diego Police officers were shot, July 28, 2016.
One police officer is dead and another is injured after they were shot in San Diego, July 28, 2016.(KGTV) One police officer is dead and another is injured after they were shot in San Diego, July 28, 2016.