The incident happened around 11:40 p.m. Tuesday at a home on Jepson Court, according to the Riverside County Sheriff's Department.
Deputies say the suspect, who has not been identified, was not cooperative and shut the front door on them. While they were trying to contact others involved in the incident, authorities say the suspect shot at them from within the residence.
That's when the man came out of the home wearing body armor and shot at them again. Deputies returned fire.
Several gunshots can be heard being fired in video taken at the scene.
The suspect was taken to a hospital where he later died. No deputies were hurt.
Authorities added that one woman at the home sustained minor injuries during the initial altercation.