A former US soldier has opened fire at a California veterans home where he was treated for post-traumatic stress disorder, taking three female staff hostage in a stand-off that ended when police found him and his captives dead.

"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 on Friday.

The incident happened at Yountville, a town in the heart of Napa Valley's wine country about 100km north of San Francisco.

Despite repeated efforts by police negotiators to communicate with the suspect throughout the day, authorities said they failed to make contact with him after he exchanged gunfire with a sheriff's deputy at the outset.

"We credit him (the deputy) with saving the lives of others in the area by eliminating the ability of the suspect to go out and find other victims," Childs said.

Authorities later identified the gunman as 36-year-old Albert Wong, a former patient of Pathway Home, a program housed at the veterans complex for former service members suffering PTSD after deployments in Iraq and Afghanistan.

The San Francisco Chronicle, citing unidentified sources, said Wong, who lived in Sacramento, had been asked to leave the program two weeks ago.

The three hostages were identified as Pathway Home Executive Director Christine Loeber, 48, the program's clinical director, therapist Jen Golick, 42, and Jennifer Gonzales, 29, a psychologist with the San Francisco Department of Veterans Affairs Healthcare System.

"These brave women were accomplished professionals, dedicated to their careers of serving our nation's veterans, working closely with those of the greatest need of attention," Pathway Home said in a statement.

The siege came less than a month after a former student with an assault-style rifle killed 17 people at a Florida high school. That massacre touched off a student-led drive for new restrictions on gun sales to curb mass shootings that have occurred with frightening frequency in the US over the past few years.

The Veterans Home of California, a residence for about 1000 aging and disabled US military veterans, is the largest facility of its kind in the US.

The entire complex was placed under lockdown during the siege, which began at about 10.30am local time on Friday and ended nearly eight hours later.

Childs said officers who eventually entered the room where the hostages were being 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 program's administrators.

Kamer said his wife told him by phone during the siege that the gunman had allowed her and three other women to leave the room, while three female employees remained behind as hostages.

The Napa County sheriff's deputy who confronted the gunman had arrived at the scene within four minutes of the first reports of gunfire, Sheriff John Robertson said.