A woman shot and wounded three people at YouTube’s headquarters in Northern California before killing herself, police say.
Police have named the suspect as Nasim Aghdam, 39, and say they are still investigating a motive.
They say there is no evidence yet that she knew the victims, a 36-year-old man said to be in a critical condition, and two women aged 32 and 27.
Aghdam had in the past posted material venting anger at YouTube.
Such “active shooter” incidents are overwhelmingly carried out by men – an FBI report found that out of 160 incidents between 2000-2013 only six of the people who opened fire were women.
Who was the suspect?
San Bruno police identified the suspect as the Persian Azeri female Nasim Aghdam, a California resident of Iranian descent.
She appeared often on YouTube and in one of her videos criticised the platform for discriminating against and filtering her posts.
YouTube terminated her account following the shooting. Her Instagram and Facebook accounts have also been removed.
On her personal website she accused YouTube of taking steps to prevent her videos from getting views.
“There is no equal growth opportunity on YouTube or any other video sharing site. Your channel will grow if they want to!” she wrote.
There had been earlier media reports that the man shot was her boyfriend, but police later said; “At this time there is no evidence that the shooter knew the victims of this shooting or that individuals were specifically targeted.”
What happened?
The suspect is reported to have approached an outdoor patio and dining area at the offices in San Bruno, near San Francisco, at about lunchtime and opened fire with a handgun.
San Bruno Police Chief Ed Barberini said officers arrived at the offices at 12:48 (19:48 GMT) local time to find a “chaotic scene”, with numerous people fleeing.
Images broadcast on local TV stations showed employees leaving with their hands raised. Other footage showed evacuees forming a queue before being individually frisked by police.
One person with a bullet wound was found at the front of the company headquarters, Mr Barberini said. Minutes later officers found a woman who appeared to have shot herself, he said.
Two further victims were later discovered at an adjacent business.
An employee at a nearby fast food restaurant told Fox station KTVU he had treated a young woman who suffered a bullet wound to the leg.
He said he had fashioned a makeshift tourniquet from a bungee cord as they waited for first responders.
Several YouTube employees tweeted about the attack as it was taking place.
Product manager Todd Sherman said people fled the building in panic as the shooting unfolded.