"It is believed the suspect was upset with the policies and practices of YouTube," said Ed Barberini, the chief of police in San Bruno, California, where YouTube's headquarters is located. "This appears to be the motive for this incident."
Police said Nasim Najafi Aghdam, 39, of San Diego, opened fire on the YouTube campus with a 9mm semiautomatic handgun she had legally purchased. Aghdam fired seemingly indiscriminately at people before turning the gun on herself, police said.
"There's absolutely no link or relationship that we've identified between our suspect and anybody who was at the scene at the time of the incident," Barberini said at a news briefing Wednesday.
In the hours before the shooting, authorities said Aghdam, who had been reported missing on Monday, encountered local police officers in another city but did not set off any alarms during that interaction. She then headed to a local gun range on Tuesday before traveling to YouTube, Barberini said.
Before she visited the gun range, police in Mountain View, California, said they encountered Aghdam sleeping in her car there early Tuesday morning. Mountain View, home to Google, YouTube's owner, is about 25 miles south of San Bruno. Aghdam's relatives have said that they warned police that Aghdam, an active YouTube user, had expressed frustration with the company and claimed it was restricting her content.
The Mountain View police said in a statement Tuesday that Aghdam never mentioned YouTube to the officers and did not discuss harming herself or anyone else.
"Throughout our entire interaction with her, she was calm and cooperative," the Mountain View police statement said. "At the conclusion of our interaction with her, she in no way met any reason for us to speak with her further or possibly detain her."
Police said they spoke to Aghdam's father and brother, but neither of them mentioned "anything about potential acts of violence or a possibility of Aghdam lashing out as a result of her issues with her videos."
Google did not respond to a request for comment Tuesday about whether the company had been contacted by police or any authorities about Aghdam.
The attack in San Bruno marked the latest high-profile burst of gun violence to transform a seemingly safe space into a chaotic scene of bloodshed and fear, and it came as the country's debate over firearms and public safety remains fraught in the wake of the Parkland, Florida, high school massacre.
The violence began about 12:45 p.m. in a courtyard outside the company's headquarters, just south of San Francisco. Witnesses described seeing a woman shooting a gun in the courtyard as others ran for their lives.
Police in San Bruno said they were called at 12:46 p.m. on Tuesday about gunshots and, after arriving two minutes later, found three people who had been shot and injured. A fourth person was also taken to the hospital after injuring an ankle while fleeing. Two people injured in the shooting were released from Zuckerberg San Francisco General Hospital Tuesday night, according to a spokesman. A third patient - a man in his 30s - was in serious condition Wednesday morning.
Aghdam appeared to be an active user of YouTube who had posted videos about veganism, fitness and animal cruelty. Channels believed to be linked to her were published in English, Farsi and Turkish, and each had several thousand subscribers; all were taken down by late Tuesday.
In videos and written posts on a website that appeared to be hers, she said that YouTube was discriminating against her and filtering her videos to keep them from getting views. One post said that "you will be suppressed for telling the truth that is not supported by the system."
Aghdam's father told the Bay Area News Group that she recently expressed to relatives relatives that YouTube was censoring her videos and stopped paying her for them. "She was angry," he said. He also said he had told police she might be going to YouTube because she "hated" the company. Her brother told KGTV, a television station in San Diego, that he warned police "she might do something" after learning Agdham had traveled to the Bay Area.
The Mountain View police said that after they found Agdham early Tuesday, they called and spoke with her father and brother.
The family then called back an hour later and said that Agdham had become upset with YouTube, which may have been the reason she was in the area, police said. The police statement said Aghdam's father "did not seem concerned that she was in the area, and wanted to simply let us know that may have been a reason for her move up here."
Neither relative could be reached for comment about the Mountain View police account. A woman who answered the door at her father's house closed it when a reporter visited Wednesday. In a statement posted outside the home, the family said it was "in absolute shock and can't make sense of what has happened."
"Although no words can describe our deep pain for this tragedy, our family would like to express their utmost regret, sorrow for what has happened to innocent victims," the family statement said. "Our thoughts and prayers are with them and their families."
A newspaper was sitting outside the family's home on Wednesday. The lead story was about the shooting at YouTube.
John Rundell, who lives next door to her parents, said he was shocked, describing the family as "wonderful."
Rundell said her father had mentioned her dislike of YouTube and was "really worried" when she went missing. After the shooting Tuesday, Rundell said he was in the family's home and described them as destroyed by what happened.
"You have a 40-year-old kid that does something crazy, it's . . . I feel really bad for them," he said.
Barberini, the San Bruno police chief, said his investigators were not aware of what information was relayed and to whom.
"I don't know what concerns were conveyed to that police department or how or where those concerns were relayed to," Barberini told ABC's "Good Morning America" on Wednesday morning.
The YouTube shooting is unusual in that most acts of mass violence are carried out by men. An FBI examination of active shootings between 2000 and 2013 looked at 160 attacks and found that just six involved female shooters. A recent Secret Service study of mass violence last year in the United States found that there were 28 such violent incidents - including the shooting rampages in Las Vegas and Sutherland Springs, Texas - and all were carried out by men.
The gunfire on Tuesday set off panic around the offices of YouTube, San Bruno's biggest employer, which has been in the process of expanding its space for years. Susan Wojcicki, YouTube's chief executive, posted on Twitter: "We will come together to heal as a family."
Sundar Pichai, chief executive of Google, said in a statement that he was "grateful to everyone inside and outside the company for the outpouring of support and best wishes."
"I know a lot of you are in shock right now," he said. "Over the coming days, we will continue to provide support to help everyone in our Google family heal from this unimaginable tragedy."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.