A woman who believed she was being suppressed by YouTube and told her family members she "hated" the company opened fire at YouTube's headquarters in California, wounding three people before taking her own life, police said.
Investigators do not believe Nasim Aghdam specifically targeted the three victims when she pulled out a handgun and fired off several rounds in a courtyard at the company's headquarters south of San Francisco on Tuesday, police said.
But a law enforcement official with knowledge of the investigation told The Associated Press that Aghdam had a longstanding dispute with the company. The official spoke on condition of anonymity because they were not authorised to discuss the case.
Aghdam's online profile shows she was a vegan activist who ran a website called NasimeSabz.com, meaning "Green Breeze" in Persian, where she posted about Persian culture and veganism, as well as long passages critical of YouTube, saying the company was trying to "suppress" content creators.
"Youtube filtered my channels to keep them from getting views!" one of the messages on the site said. "There is no equal growth opportunity on YOUTUBE or any other video sharing site, your channel will grow if they want to!!!!!"
Aghdam "hated" YouTube and was angry that the company stopped paying her for videos she posted on the platform, her father, Ismail Aghdam, told the Bay Area News Group.
On Monday, he called police to report his daughter missing after she didn't answer the phone for two days and warned officers that she might go to YouTube, he said.
Officers in Mountain View - about 30 miles (48 kilometres) from YouTube's headquarters - found her sleeping in her car in a parking lot around 2am Tuesday but let her go after she refused to answer their questions. Aghdam didn't appear to be a threat to herself or others, police spokeswoman Katie Nelson said.
Nelson would not say whether officers had been warned that Aghdam might have been headed to YouTube headquarters.
Earlier Tuesday, law enforcement said the shooting was being investigated as a domestic dispute but did not elaborate. It was not immediately clear why police later said the people shot were not specifically targeted.
One of the victims - a 36-year-old man - was in critical condition, a spokesman for San Francisco General Hospital said. A 32-year-old woman was in serious condition and a 27-year-old woman in fair condition, the spokesman said.
YouTube employee Dianna Arnspiger said she was on the building's second floor when she heard gunshots, ran to a window and saw the shooter on a patio outside.
"It was a woman and she was firing her gun. And I just said, 'Shooter,' and everybody started running," Arnspiger said.
She and others hid in a conference room for an hour while another employee repeatedly called 911 for updates.
The world's biggest online video website is owned by Silicon Valley giant Google, but company officials said it's a tight-knit community. The headquarters has more than a thousand engineers and other employees in several buildings. Originally built in the late 1990s for the clothing retailer Gap, the campus south of San Francisco is known for its sloped green roof of native grasses.
Inside, Google several years ago famously outfitted the office with a 3-lane red slide for workers to zoom from one story to another.
"Today it feels like the entire community of YouTube, all of the employees, were victims of this crime," said Chris Dale, a spokesman for YouTube.
YouTube CEO Susan Wojcicki said in a tweet the company would "come together to heal as a family."
Officers and federal agents responding to multiple 911 calls swarmed the company's campus sandwiched between two interstates in the San Francisco Bay Area city of San Bruno.
Zach Vorhies, 37, a senior software engineer at YouTube, said he was at his desk working on the second floor of one of the buildings on the campus when the fire alarm went off.
He got on his skateboard and approached a courtyard, where he saw the shooter yelling, "Come get me." He said the public can access the courtyard where he saw the shooter without any security check during working hours.
There was somebody lying nearby on his back with a red stain on his stomach that appeared to be from a bullet wound.
He said he realized it was an active shooter incident when a police officer with an assault rifle came through a security door. He jumped on his skateboard and took off.
Officers discovered one victim with a gunshot wound when they arrived and then found the shooter with what appeared to be a self-inflicted gunshot wound several minutes later, San Bruno Police Chief Ed Barberini said. He said two additional gunshot victims were later located at an adjacent business.