The man who fired the shots was wanted by police in connection with a murder discovered on Tuesday in Rohnert Park.
The suspect was in a standoff with San Francisco police for hours while he was inside an apartment on Post Street that may have belonged to a girlfriend.
"One officer tried to contact him, there were shots fired. He barricaded himself inside his apartment. My understanding is he lit the fire in his apartment and there's been multiple incidents of him shooting through the apartment," said San Francisco Police Sgt. Patrick McCormick.
"I heard there was a shooter so I closed my windows, closed my blinds up and came downstairs to have a cigarette and now I can't get back in because I came down the block and they won't let me go back," said nearby resident Jordan Aylesworth.
San Francisco Police Chief Greg Suhr told reporters, "Police came to checkout information they had regarding a suspect involved in a homicide, a recent homicide in Rohnert Park. A girlfriend of the suspect came to the door, the suspect was inside, Rohnert Park called for backup from SFPD, SFPD arrived, Rohnert Park officers had already drawn their weapons and engaged the suspect, several shots were fired at the officers, officers withdrew, tried to set up a perimeter. Over the course of the next hour, the suspect fired multiple shots through walls and floors, the building had other people in it, at some point in time in the ballpark of 10 p.m., the suspect set fires within the apartment, at this point in time the incident commander made the decision that there was an immediate danger to life or serious injury to the other tenants to the building, gave the green light to eliminate the threat when it could be done safely. That opportunity presented itself, the suspect was neutralized and is dead at this time."
He also said San Francisco police and Rohnert Park officers will conduct an investigation.
Police let some residents return to their homes late last night.
Police say the man is a suspect in a murder in Rohnert Park, but they're not saying what the link may be. Police found the body of a 66-year-old woman in her home on Bernice Avenue. She's been identified as Dianne Hughes. Investigators say she lived alone and there appeared to have been a violent struggle. They have been looking for her missing white Toyota Highlander.
The San Francisco Police Department will hold a news conference at 11 a.m. regarding the suspect and standoff.