(Reuters) - A California police officer responding to a traffic accident in the Los Angeles area was fatally shot on Monday by a gang member who was involved in the collision, a law enforcement spokesman said.

A second officer with the Whittier Police Department and the suspect, a Hispanic man in his 20s, were wounded in the exchange of gunfire, said Lieutenant John Corina of the Los Angeles County Sheriff’s Department.

The fallen officer, Keith Boyer, was 53 and survived by two adult sons, California Governor Jerry Brown said in a statement expressing condolences.

The officers had responded to a traffic accident in Whittier when they determined that one of the cars was registered as stolen. When they approached it, the suspect opened fire, Corina told a news conference.

“We’re still trying to determine why he shot. Obviously, he was in a stolen car. He is a gang member. We’re trying to determine if anything else sparked that,” he said.

Both officers and the suspect were taken to a hospital, where Boyer died, Corina said. The second officer, whom officials have yet to identify, and the suspect were in stable condition.

There had been four firearms-related law enforcement deaths this year through Monday, down from nine in the same period in 2016, according to the National Law Enforcement Officers Memorial Fund, which tracks on-duty fatalities.