Police in San Bruno, Calif., say one person is dead and four people are in hospital after a shooting at YouTube headquarters.

Police believe the person who died — a woman — was the shooter, but they are still investigating, San Bruno Police Chief Ed Barberini said.

"This is an active event and an active investigation," he said. Law enforcement are still searching the business to make sure it's clear.

Top cop talks about injuries after shooting at YouTube office 5:57

The chief said that four people were taken to hospital with gunshot-related injuries, but a statement released by the department later clarified that while four people were transported, only three of them had gunshot-related wounds.

"The extent of the victims' injuries are unknown at this time," the statement said.

Tuesday evening, a law enforcement official told the Associated Press the suspected shooter was Nasim Aghdam of Southern California. Multiple U.S. news agencies also named Aghdam as the suspected shooter.

At a news conference held later Tuesday, the chief confirmed that the fourth injury was someone who had been hurt as they tried to flee the building.

He said the building is now "completely secure" and there's no threat to public safety. The onus now, he said, is on investigators who need to determine exactly what happened at the sprawling office of the video giant.

'Horrific act of violence'

Google's CEO Sundar Pichai said in a statement to employees that the company is actively monitoring the situation and working with law enforcement and hospitals. He called the shooting a "horrific act of violence" and said the company was working to support the people who had been injured and their families.

There are no words to describe the tragedy that occurred today. <a href="https://twitter.com/SusanWojcicki?ref_src=twsrc%5Etfw">@SusanWojcicki</a> & I are focused on supporting our employees & the <a href="https://twitter.com/YouTube?ref_src=twsrc%5Etfw">@YouTube</a> community through this difficult time together. Thank you to the police & first responders for their efforts, and to all for msgs of support. —@sundarpichai

The world's biggest online video website is located on a suburban campus.

As the events unfolded, television news footage showed people leaving the building in a line with their arms in the air so police could inspect them. Officers patted down people grouped outside, and police vehicles surrounded the area.

Some YouTube staff members, including Todd Sherman, tweeted about what they saw and heard.

After existing the room we still didn’t know what was going on but more people were running. Seemed serious and not like a drill. —@tdd

Sherman said as they headed toward the exit, they met others who said there was a person with a gun.

"At that point every new person I saw was a potential shooter. Someone else said that the person shot out the back doors and then shot themselves," he said on Twitter.

Aerial footage shows police gathered at the YouTube headquarters, where officers responded to reports of an active shooter. (KNTV)

A spokesperson for San Francisco General Hospital said it had received three patients: a 36-year-old man who was in critical condition, a 32-year-old woman in serious condition and a 27-year-old woman in fair condition.

At a news conference around 3:30 p.m. local time, attending surgeon Andre Campbell said all patients were awake and that none had yet required surgery.

'It was terrifying'

YouTube employee Dianna Arnspiger says she was on the second floor when she heard gunshots, ran to the window and saw a woman firing a gun on a patio outside.

She said the woman wore glasses and a scarf and was using a "big huge pistol."

Arnspiger said she called out, "'Shooter,' and everybody started running." She and others hid in a conference room for an hour while someone called 911 repeatedly for updates. "It was terrifying."

YouTube's headquarters has more than 1,000 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 famously outfitted the office several years ago with a three-lane red slide for workers to zoom from one storey to another.

"Today it feels like the entire community of YouTube, all of the employees, were victims of this crime," said Chris Dale, a YouTube spokesman. "Our hearts go out to all those who suffered."