PALM SPRINGS, Calif. (AP) -- Two Palm Springs police officers trying to resolve a family dispute were killed when a man they had been speaking with suddenly pulled out a gun and opened fire on them, the city's police chief said.
A third officer was wounded and taken to a hospital.
Police apprehended the man suspected in the shooting.
The Riverside County Sheriff's Department identified him Sunday as John Felix. He will be charged with two counts of murder on a peace officer.
Officials say Felix surrendered after a lengthy standoff. He was injured and treated at a hospital.
Palm Springs police Chief Bryan Reyes identified the officers slain Saturday as Jose "Gil" Gilbert Vega and Lesley Zerebny.
Zerebny, 27, had been with the department for about 18 months and only recently returned from maternity leave after giving birth to a daughter four months ago. Vega, a father of eight, was a 35-year veteran who planned to retire in December. He had been working overtime on his day off Saturday.
The wounded officer's name was not released.
Reyes didn't identify the shooting suspect by name but indicated police had had previous dealings with him. He declined to elaborate, adding that Riverside County sheriff's deputies were now in charge of the investigation.
Riverside County SWAT officers Saturday quickly sealed off the normally quiet residential neighborhood in this desert resort town as police evacuated some residents. They told others to stay inside their homes, keep their doors locked and not to open them for anyone until further notice.
As the lockdown continued, scores of police officers gathered at Palm Springs Desert Regional Medical Center to offer a somber salute as the bodies of Zerebny and Vega were loaded into white hearses for transport to a coroner's office.
Meanwhile, in front of police headquarters, scores of local residents gathered to leave flowers, balloons and cards Saturday night.
"I don't even remember anything so vicious and cruel," said Palm Springs resident Heidi Thompson. "These officers are responding to a domestic call for somebody in need that they don't even know. They put their life on the line for us, the community. And they get gunned down? I don't understand it."
The shooting occurred just three days after a popular Los Angeles County sheriff's sergeant was shot and killed in the high desert town of Lancaster.
Sgt. Steve Owen was answering a burglary call when sheriff's officials say he was shot by a man who then stood over him and shot him four more times.
A paroled robber has been charged with murder.
Hundreds of residents held a candlelight vigil Saturday night in his honor.