Police identified the gunman as Jeremy Goulet. The Santa Cruz Sheriff's Department is investigating the incident.
A man suspected of killing two police detectives in California on Tuesday has been fatally shot, authorities said.
The suspect is believed to have gunned down the Santa Cruz Police Department officers in the afternoon when they approached him during an investigation, the sheriff's office said in a statement.
When backup arrived, the suspect had disappeared, prompting officers to set up a perimeter, Santa Cruz County Sheriff Phil Wowak said.
Officers located him and a chase ensued, followed by a gunfight.
"The suspect was shot and killed," he said.
The officers killed are detectives Sgt. Loran Baker and Elizabeth Butler.
Baker was a 28-year-veteran of the department, who left behind a wife, two daughters and a son -- who also works for the department.
Butler was with the department for 10 years. She leaves behind two young boys.
"This is the darkest day in the history of the Santa Cruz Police Department," Police Chief, Kevin Vogel.
Police identified the gunman as Jeremy Goulet.
The Santa Cruz Sheriff's Department is investigating the incident.
CNN's Amanda Watts contributed to this report.