A gunman who took hostages and killed three workers at a veteran’s facility had been treated there as a patient.

Albert Wong, a 36-year-old former Army infantryman, killed three workers and himself at the Veterans Home of California in Yountville just a week after he had been dismissed from a programme there, state Senator Bill Dodd said.

He had been treated for post-traumatic stress disorder (PTSD) at Pathway Home, a programme at the Yountville complex, after serving in the Army from 2010 to 2013. He received four medals including an Afghanistan campaign medal and was awarded an Expert Marksmanship Badge with Rifle, the Pentagon said.

The incident began at 10:30am local time on 9 March and did not end until eight hours later when police entered the room to find Wong and his three victims: 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.

The San Francisco Chronicle, citing unnamed sources, said he had been asked to leave the program two weeks ago.

Devereaux Smith, an administrator at the facility, told her husband Larry Kamer, a volunteer there, by phone during the siege that the gunman had let her and three other women leave the room where the party was taking place, but that he kept three female employees behind as hostages.

The employees were attending a farewell party of one of their colleagues when Wong walked in with a rifle.

Homeless veteran who gave woman his last £15 has life completely rebuilt after £300k crowdfunding donations

Police had been unable to make contact with Wong or the hostages after the beginning of the standoff when Wong had exchanged gunfire with a sheriff's deputy.

“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.

"We are deeply saddened by the tragic situation in Yountville and mourn the loss of three incredible women who cared for our Veterans," US President Donald Trump said on Saturday on Twitter.

Veterans join protesters at Standing Rock Show all 11 1 /11 Veterans join protesters at Standing Rock Veterans join protesters at Standing Rock Veterans have a confrontation with police on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9M REUTERS Veterans join protesters at Standing Rock Veterans walk towards the police barricade on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S. December 1, 2016. REUTERS/Stephanie Keith - RTSUA9D REUTERS Veterans join protesters at Standing Rock A man holds up a traditional drum during a confrontation between veterans and police on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9E REUTERS Veterans join protesters at Standing Rock Veterans walk towards the police barricade on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9J REUTERS Veterans join protesters at Standing Rock Veterans have a demonstration on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9N REUTERS Veterans join protesters at Standing Rock Veterans have a demonstration on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9O REUTERS Veterans join protesters at Standing Rock Veterans have a confrontation with police on Backwater bridge during a protest against plans to pass the Dakota Access pipeline near the Standing Rock Indian Reservation, near Cannon Ball, North Dakota, U.S., December 1, 2016. REUTERS/Stephanie Keith - RTSUA9V REUTERS Veterans join protesters at Standing Rock Trek Kelly of Venice Beach, California, stands with veterans who oppose the Dakota Access oil pipeline on Backwater Bridge near Cannon Ball, North Dakota, U.S., December 2, 2016. REUTERS/Terray Sylvester - RTSUF7J REUTERS Veterans join protesters at Standing Rock Korean War veteran George Martin, 80, an Ojibwe tribe from Hopkins, Michigan, stands with veterans who oppose the Dakota Access oil pipeline on Backwater Bridge near Cannon Ball, North Dakota, U.S., December 2, 2016. REUTERS/Terray Sylvester - RTSUF7U REUTERS Veterans join protesters at Standing Rock Korean War veteran George Martin, 80, an Ojibwe tribe from Hopkins, Michigan, stands with veterans who oppose the Dakota Access oil pipeline on Backwater Bridge near Cannon Ball, North Dakota, U.S., November 2, 2016. REUTERS/Terray Sylvester - RTSUF8F REUTERS Veterans join protesters at Standing Rock Phyllis Young (C) of the Standing Rock Sioux Tribe talks with veterans who oppose the Dakota Access oil pipeline and local law enforcement on Backwater Bridge near Cannon Ball, North Dakota, U.S., December 2, 2016. REUTERS/Terray Sylvester - RTSUF8I REUTERS

Veterans Affairs Secretary David Shulkin said: “We are deeply saddened and affected by the tragic outcome of the hostage situation at the Veterans Home of California in Yountville and extend our deepest condolences to the loved ones involved".

Flags around the state were ordered to fly at half mast per Governor Jerry Brown.

James Musson, a 75-year-old Army veteran and resident of the sprawling facility located in the heart of Napa Valley wine country, told Reuters many who lived there voiced concerns about lax security, saying visitors could walk in and out without restriction and that public safety officers were not armed.

Around 1,000 disabled or elderly veterans are residents there.

"The Pathway Home is known for its sometimes unconventional therapies, which have included swimming with dolphins and holding social events in which the veterans mix with children. About 450 people have been treated at the unit since its opening, mostly for PTSD, mild traumatic brain injury and other post-deployment mental health challenges," the San Francisco Chronicle reported.