Riverside police swarmed the Tyler Spring Senior Apartments in the 10400 block of Indiana Avenue just after 7:30 a.m. Many in the quiet community woke up to the sound of gunshots and sirens.
"Our detectives from the Riverside Police Department sexual assault and child abuse unit came to the location to serve a search warrant on a subject to who has several counts of child molestation," said Lt. Guy Toussaint of the Riverside Police Department.
The suspect barricaded himself inside the complex, prompting authorities to evacuate nearby residents and shut down Indiana Avenue.
The tense standoff ended about 2 1/2 hours later. The suspect was found inside his apartment dead from an apparent gunshot wound.
Officers initially opened fire when the suspect allegedly pulled out a shotgun.
It was unclear if the suspect died from police gunfire or from a self-inflicted gunshot wound.
"He did have what appeared to be gunshot wounds. The coroner will determine the cause of death," Toussaint said.
Riverside police say one officer suffered minor injuries while jumping out of the line of fire.
The suspect's name has not been released.
Police said the investigation is ongoing.