At least three people were wounded when a woman opened fire at the YouTube headquarters before shooting herself to death on Tuesday, the San Bruno Police Department said.
One of the victims of the gunfire is said to be in a critical condition and the police said it is investigating the matter.
"Our thoughts and prayers are with everybody involved. Thank you to our phenomenal Law Enforcement Officers and First Responders that are currently on the scene," US President Donald Trump said in a tweet.
Was just briefed on the shooting at YouTubeâ€™s HQ in San Bruno, California. Our thoughts and prayers are with everybody involved. Thank you to our phenomenal Law Enforcement Officers and First Responders that are currently on the scene.â€” Donald J. Trump (@realDonaldTrump)Â April 3, 2018
According to reports, the suspect may have known one of the victims, but police said, "At this time there is no evidence that the shooter knew the victims of this shooting or that individuals were specifically targeted."
It was around 12.46 pm (local time) that the San Bruno Police Department received numerous 911 calls reporting gunfire at the YouTube campus located at 901 Cherry Avenue in San Bruno. The police arrived at the scene at 12:48 pm, two minutes after the first call, and immediately began searching for a possible suspect.
At 12:53 pm, officers conducting a search located a deceased female inside with a possible self-inflicted gunshot wound.
"We have one subject who is deceased inside the building with a self-inflicted wound at this time, (who) we believe to be the shooter," San Bruno Police Chief Ed Barberini told reporters at a news conference outside YouTube headquarters.
Two additional victims were located after fleeing to a next-door business.
"A total of four people were transported to local hospitals, three of which had gunshot wounds. The extent of the victims' injuries is unknown at this time," the police said.
A YouTube product manager, Todd Sherman, wrote on Twitter of hearing people running, first thinking it was an earthquake before he was told that a person had a gun.
The YouTube headquarters in San Bruno near Silicon Valley has a significant number of Indian-American professionals.
Google, which owns the world's biggest online video website, in a tweet, advised all other employees in the Bay Area, and people with meetings scheduled, to stay away from the area.
"There is no need to take any action. We have provided employees a helpline," it said.
In another tweet, it said the company was coordinating with authorities.
"Re: YouTube situation, we are coordinating with authorities and will provide official information here from Google and YouTube as it becomes available," Google communications tweeted.
A law-enforcement source told the Bay Area News Group that the shooting appeared to have been fuelled by a domestic dispute and that the suspect was targeting her boyfriend.
Apple CEO Tim Cook sent his sympathies to the victims.
"From everyone at Apple, we send our sympathy and support to the team at YouTube and Google, especially the victims and their families," Cook tweeted.
"My stomach sinks with yet another active shooter alert. I'm praying for the safety of everyone at YouTube headquarters," tweeted Senator Dianne Feinstein.
YouTube headquarters is located some 50 kilometres from the main Google campus in Mountain View.
(With inputs from agencies)