(CNN) After an apparent hourslong standoff between police and a gunman, three women were found dead Friday night at the Veterans Home of California in Yountville, authorities said.

The suspect was also found dead, Chris Childs, assistant chief of the California Highway Patrol's Golden Gate Division, told reporters.

The three victims were earlier described as employees of The Pathway Home, a counseling service for veterans who suffer post-traumatic stress disorder (PTSD), which is on the property.

The suspect had been a client at facility until he left two weeks ago, according to State Senator Bill Dodd.

It's unclear if the women were chosen at random or had a connection with the gunman.

Hostage negotiators had spent hours trying to contact the gunman at the facility north of San Francisco but were not able to do so, according to California Highway Patrol spokesman Robert Nacke. After the victims were found, investigators were left to determine when during the standoff the deaths occurred.

Chris Childs, assistant chief of the California Highway Patrol's Golden Gate Division reporters that three women and the gunman at the Veterans Home of California in Yountville.

California Gov. Jerry Brown said the shooting "tragically took the lives of three people dedicated to serving our veterans."

"Our hearts go out to their families and loved ones and the entire community of Yountville," Brown said in a statement.

The governor has ordered flags in the state's capitol to fly at half staff in tribute to the victims and their families.

Larry Kamer told CNN that his wife, Pathway employee Devereaux Smith, said the gunman barged into a going-away party for Pathway employees leaving the job.

"They were having cake and toasting, apparently he just walked in with this rifle," Kamer said. He said his wife and some other employees managed to escape, though he didn't say how.

The man was holding the three people hostage in a room inside the building, Napa County Sheriff John Robertson said during the afternoon.

"We've tried numerous times and been trying since 10:30 this morning to contact him by his own cell phone and also the phones in the dorm area," the sheriff said.

Officers are at the scene Friday at the Veterans Home of California in Yountville.

He said authorities knew the gunman's identity but did not release it. Robertson didn't give a motive for the gunman's actions.

Early in the standoff, the man and officers fired shots at each other.

"There was an exchange of gunfire, fired by the suspect and our deputy," Robertson said. "There were many bullets fired."

Law enforcement officers responded to a "shots fired" report around 10:20 a.m. local time from the facility that houses about 1,000 veterans, Robertson said.

Robertson said about 70 students who were inside a theater on the grounds of the veterans home, were safely evacuated.

"They were always safe," the sheriff said. "They were put into a locked down position for their own safety." The ages of the students or why they were at the veterans home was not clear Friday afternoon.

A sheriff's hostage negotiation team passes a California Highway Patrol checkpoint at the Veterans Home of California in Yountville.

The California Department of Veterans (CalVet), which operates the home, said it enacted its emergency protocol. Police surrounded the facility and told people to avoid the area.

Marlon Harrison was one of the family members who gathered outside the gates to the home.

"I'm waiting for a phone call from my daughter," Harrison said. "It's considered a lockdown building, you can't go in unless authorized."

Law enforcement members stage near the Veterans Home of California on Friday.

The FBI deployed a SWAT team to Yountville, spokesperson Katherine Zackel said. The Bureau of Alcohol, Tobacco, Firearms and Explosives said via Twitter it was also responding.

Founded in 1884, the facility houses about 1,000 aging vets and is the largest veterans home in the United States, according to the CalVet.

Men and women who served in World War II, the Korean War, the Vietnam War, Desert Storm and Operation Enduring Freedom/Operation Iraqi Freedom live there, CalVet said.

The veterans home is an important part of the Napa Valley Community, with the 1,200-seat Lincoln Theater, a golf course and a large library, CalVet said.

Residents were temporarily evacuated from the veterans home in October when fires raged through Napa County.

Yountville is a town of about 3,000 residents in the north San Francisco Bay area.

The Veterans Home of California in Yountville in 2011.

CORRECTION: This story has been revised to correctly spell the last name of Larry Kamer.