Three women were found dead after a gunman took them hostage at a US war veterans complex in California.
Police negotiators had tried to communicate with the attacker throughout the day-long standoff, but to no avail.
He was later found dead in the room where had spent most of Friday, after an initial exchange of fire with police.
State senator Bill Dodd told reporters the gunman was a member of Pathway Home, a programme based at the veterans’ complex to treat those suffering from post-traumatic stress disorder (PTSD).
The three women were understood to be employees at the complex, added Dodd.
"This is a tragic piece of news, one that we were really hoping we wouldn't have to come before the public to give," California Highway Patrol spokesman Chris Childs told reporters outside the facility in Yountville, a town located in the heart of Napa Valley's wine country about 97 kilometres north of San Francisco.
The shooting comes less than a month after a former student went on a deadly gun rampage at a Florida high school, killing 17 people.
The Veterans Home of California — a residence for about 1,000 U.S. military veterans and the largest of its kind in the US — was put on lockdown around 1930 CET (10.30am local time) on Friday and ended nearly eight hours later.
Childs said officers who eventually entered the room where the hostages were known to have been held found all four bodies there. He did not elaborate on how the victims or gunman had died.
The incident began when the gunman calmly walked into the Pathway Home building carrying a rifle during a going-away party for one of the employees, according to Larry Kamer, the husband of one of the programme's administrators.