A Napa man who’d threatened to kill family members died early Wednesday morning after he apparently shot himself while police were gathered outside his home, according to Napa police officials.

Capt. Jeff Troendly said officers were called at 7:30 p.m. Tuesday to a home on Central Avenue about a man threatening to kill his wife and two daughters.

As an officer attempted to contact people inside the home a shot was heard and officers backed away from the residence, Troendly said.

When a woman appeared in a window, officers got her attention and had her crawl outside. A second shot was heard.

Officers learned no one else was in the home, and that the couple’s daughters were away.

Multiple attempts were made to reach the man and eventually a robot with a camera was sent inside.

The robot found no sign of the man, but couldn’t get into one room — a bathroom — as the door was apparently blocked, Troendly said.

The city’s SWAT team went in and found the man, dead, in the room.

The incident ended at about 1 a.m., the captain said.