Dennis Wallace, a 20-year veteran of the department, was shot twice "in direct contact with his head" while initiating an investigation of a suspicious van at Fox Grove Fishing Access, Stanislaus County Sheriff Adam Christianson said.
Wallace was 53 years old. The sheriff said Wallace "was calling in the stolen car to dispatch and then everything went silent. When more officers arrived at the scene he was found dead from two close-range gunshots to the head."
Police caught the suspect, David Machado, 36, after a manhunt on Sunday.
Machado is suspected of carjacking someone in the nearby community of Keyes after fatally shooting Wallace.
Authorities were able to identify Machado based on the stolen car he was driving, police said.
Wallace did not fire any shots at the suspect; he didn't even get his gun out of his holster because it all happened so fast, Christianson said.
The investigation is ongoing. "We will seek justice," Christianson said
Machado was also wanted on a warrant for previous felony criminal activity, officials said.
Police are awaiting a statement by Machado and he will stand trial in Stanislaus County, according to authorities. It was unclear if Machado has a lawyer yet.
"He is facing murder charges for killing a peace officer. This is a capital offense," Christianson said. "I will do anything in my power to make sure he ends up on death row."
"It's time to stand united, it's time to stand together with public safety and with law enforcement to stop what's happening in our nation," Christianson said.