By Da Lin

PITTSBURG (CBS SF) — A man armed with a gun was shot dead by police officers Thursday night at an apartment complex in Pittsburg.

Investigators said the officers were responding to a domestic violence case at the Stoneman Apartment Complex at 2320 Loveridge Road in Pittsburg.

READ MORE: UPDATE: Suspect In Attempted Armed Carjacking Killed In Shootout With San Jose Police

A woman had called 911 just before 9:30 p.m. Thursday asking for help, saying her ex-boyfriend, armed with a gun, was trying to break into her second-story apartment.

Officers responded and found a man on a stairway. They said he refused to cooperate and wouldn’t drop his gun.

Pittsburg police said when the man turned toward the officers and pointed his handgun at them, two officers fired at the man. Police said the man fell to the ground, still holding the firearm.

Not sure if the man was still a threat, officers told neighbors to stay away. Officers flew a drone to get close to see his condition. Once it was determined safe, paramedics moved in and pronounced the suspect dead.

READ MORE: Marin Brewing Company Shutting Down After 3 Decades Due To Pandemic Struggles

“They lived together, then she put him out or whatever. We’ve got to find better ways in communicating and work with each other. If it’s a situation where someone says they don’t want to be with you anymore, you’ve got to accept it and move on,” said neighbor Damon Pierson.

Neighbors said it was a sad ending for everyone involved. Most people praised the police for saving the woman’s life. It appeared she shared at least a child with the 31-year-old man.

“It’s very scary. I’m glad she was proactive and call the police and didn’t try to take it upon herself,” said neighbor Keyanna Hachlica.

“If you have a gun, and the police tell you to put it down and you don’t put it down. Then there’s not a lot to go to bat for,” said Pierson.

MORE NEWS: Queen Of The Valley Hospital Workers Stage Picket Over Pandemic Staffing, Pay Issues

Police said they’ll release the officers’ names and chest cam footage in the coming days.