A standoff between an allegedly armed man and police ended in gunfire Sunday, when police say they fatally shot the man while raiding a Nob Hill residence.

According to San Francisco Police Department spokesperson Sergeant Mike Andraychak, police were called to a residence on Salmon Street, a short alley between Taylor and Mason Streets, just off Pacific Avenue at 11:35 p.m. Saturday on reports of a "domestic violence situation involving a weapon."

When officers arrived, they learned that an allegedly armed man, who police said Monday was 38 years old, had barricaded himself in the apartment with his wife (aged 41,police said Monday) and two children, aged 5 and 11. Andraychak says that responding officers could hear yelling coming from the apartment in question, and "within minutes of their arrival, the officers heard a gunshot inside the apartment."

That spurred the SFPD to summon their tactical unit and crisis hostage negotiators to the scene. The latter made contact with the man, Andraychak says, "and engaged in dialogue with him throughout the morning," attempting to convince the man to release the woman and children and surrender himself.

However, by 2:50 Sunday morning, the man was apparently done speaking with negotiators, and ceased communications, Andraychak says. He says that police then heard another gunshot, and "fearing for the safety of the hostages, the tactical team entered the apartment."

When they entered the apartment, police shot the man. He was transported to an area hospital for treatment, where he succumbed to his injuries. As of Monday morning, he had not been publicly identified by police or the San Francisco Medical Examiner's Office.

Andraychak says that the woman and two children who'd been in the apartment with the man were treated and released at the scene. Andraychak has not confirmed that a gun was found at the scene, but says that the shooting is being investigated by the SFPD Homicide Detail, the SFPD Internal Affairs Division, the San Francisco District Attorney’s Office, the Department of Police Accountability and the Office of the Chief Medical Examiner.

The Chron reports that neighbors say the man lived in the apartment, with one telling the paper that "the children sometimes played in the street, but that her interactions with the man never amounted to more than a friendly wave."

It’s shocking that something like this could happen in the neighborhood,” the neighbor told the Chron.

“The neighbors all know each other, but that family pretty much just kept to themselves.”

Andraychak asks that anyone with information on the case to contact the SFPD Tip Line at (415) 575-4444 or to Text a Tip to TIP411 and begin the text message with SFPD. He says that additional details on the shooting will be released "as it becomes available," and that "a town hall meeting regarding the incident will be held within ten days."

Related: Man Shot By SFPD Had Moved To SF To Start Fitness Business