The Riverside County Sheriff's Department identified the suspect as 26-year-old John Felix of Palm Springs.
Palm Springs Police Chief Bryan Reyes said a woman called police at about 12:18 p.m. on Saturday to report that her son was causing a disturbance in the 2700 block of Cypress Road.
2 officers killed, 1 injured in Palm Springs shooting, police say
According to authorities, four officers arrived at the scene and Felix would not open the door to the home, threatening to shoot the officers.
PHOTOS: 2 officers killed, 1 injured in Palm Springs shooting
Felix suddenly pulled out a gun and opened fire, Reyes stated.
A witness at the scene said he heard at least 100 shots erupt and saw three to four officers attempting to revive an officer.
A third officer was also wounded in the shooting. Reyes said the officer was alert and providing investigators with more information on the situation.
Reyes identified the two officers who were killed as Officer Jose Gilbert Vega and Officer Lesley Zerebny.
MORE: Community mourns loss of 2 Palm Springs police officers
Vega, 63, was a 35-year veteran at the police department and was due to retire in December. Reyes said he had been working overtime on an unscheduled shift. Vega was also married and a father of eight.
Zerebny, 27, had been with the department for about 18 months. Reyes said she had given birth to a child about four months ago and had just returned to work. She was married to a Riverside County sheriff's deputy.
SWAT officers surrounded the home after Felix barricaded himself in as the quiet neighborhood was sealed off. Several residents in the area were evacuated due to the situation.
Authorities used robots to breach the front door of the home and later announced Felix was in custody about 12 hours after the initial shootings.
Felix suffered non-life threatening injuries and was taken to the hospital. Authorities said Felix would be booked on two counts of murder on a peace officer.
Police robot just rolled right past media and into scene. One of the strangest things I've ever seen. pic.twitter.com/FgbHKiTiag— Greg Lee (@abc7greg) October 9, 2016
Reyes had indicated the suspect had previous dealings with police.
The investigation was turned over to the Riverside County Sheriff's Department and more details about the arrest were expected to be announced at an 11 a.m. news conference.
The shooting happened just three days after Sgt. Steve Owen, a popular sergeant with the Los Angeles County Sheriff's Department, was shot and killed while responding to a burglary call in Lancaster.
MORE: Slain sheriff's sergeant known for work with youth, community
Sheriff Jim McDonnell said 27-year-old Trenton Trevon Lovell shot Owen, then stood over his body and shot him four more times. Lovell has been charged with capital murder.
The Associated Press contributed to this report.