gunman who once served in the U.S. military and three women were found dead hours after he took them hostage inside a veterans home in California.
The facility was holding a going-away party for some employees when the gunman walked calmly into a room holding a rifle.
The shooter exchanged fire with police on Friday as police negotiators sought to make contact with him for more than eight hours.
Chris Childs, chief of the California Highway Patrol, said the gunman and three women were found dead when officers entered the room where the hostages were being held around 6 pm on Friday.
Staff and residents at the sprawling facility in Yountville, a picturesque town located in the heart of Napa Valley's wine country about 60 miles (97 km) north of San Francisco, had been placed under a security lockdown.
The stand-off comes less than a month after a former student with an assault-style rifle killed 17 people at a Florida high school. The massacre touched off a student-led drive for new restrictions on gun ownershipto prevent the kind of mass shootings that have become an epidemic in the United States.
State Senator Bill Dodd, who represents the area, told reporters that the California gunman was a member of the Pathway Home, a programme for veterans suffering from post-traumatic stress disorder, or PTSD.
The hostages were believed to be employees who worked with the suspect in the Pathway programme, he said.
The Veterans Home of California, which houses about 1,000 disabled and aging military veterans, is the largest facility of its kind in the United States.
An employee who encountered the gunman told her husband, Larry Kamer, by telephone that the three hostages were women, he said. "She's quite shaken up. She's in a locked-down building," Kamer said of his wife, who is development director for the non-profit organisation that runs the home.
Hostage negotiators from three different agencies had been trying to make contact with the suspect, the CHP said.
"Gunfire was exchanged. It's not known at this time how many rounds were exchanged," CHP spokesman Chris Childs told reporters before the stand off came to an end.
A Napa County sheriff's deputy arrived at the scene within four minutes of the first reports of gunfire and exchanged shots with the suspect, Sheriff John Robertson said. Authorities know the gunman's identity, he said, but were not disclosing his name publicly.
A resident of the home, identified as Rod Allen by the CBS television affiliate KPIX, said the gunman took the hostages after allowing some people at a party to leave. He fired about 30 shots, the resident said.