The man who killed three women after a stand-off at a veterans' home in Napa Valley, California was a former patient, authorities say.
The three victims were all employees at the centre in Yountville.
The residential centre provides mental health services for veterans of the wars in Iraq and Afghanistan.
The suspected gunman, who died at the scene, has been named as Albert Wong, 36. No motive for the attack has been identified, police say.
Wong, reportedly a former US Army rifleman, had left a programme to treat post-traumatic stress disorder (PTSD).
The gunman entered the building while employees were having cake as a leaving celebration for some colleagues.
After a siege lasting all day police discovered the four bodies in a room at The Pathway Home on Friday evening.
Praise for responding officer
The three employees who died have been named by the Napa County Sheriff-Coroner's Office as Jennifer Golick, 42, the clinical director, Christine Loeber, 48, the executive director, and 29-year-old Jennifer Gonzalez, a clinical psychologist.
"These brave women were accomplished professionals who dedicated their careers to serving our nation's veterans, working closely with those in the greatest need of attention after deployments in Iraq and Afghanistan," The Pathway Home said in a statement.
Ms Golick's father-in-law told the Associated Press that she had recently removed Wong from the treatment programme.
We are deeply saddened by the tragic situation in Yountville and mourn the loss of three incredible women who cared for our Veterans.— Donald J. Trump (@realDonaldTrump) March 10, 2018
The soldier had spent a year in Afghanistan and had been awarded four medals, US media report.
Assistant Chief Chris Childs of the California Highway Patrol paid tribute to the first officer on the scene, who, he said, put himself in harm's way and exchanged of gunfire with the suspect.
"We believe and credit him with saving the lives of others in the area by eliminating the ability for the suspect to go out and find further victims," he said.
It is not clear whether the victims or the suspect were alive in the time in between the last exchange of fire and the discovery of the bodies about eight hours later.