Click here if you are having trouble viewing video on a mobile device.

A correction to an earlier version of this article has been appended to the end of the article.

SAN BRUNO — A woman shot and killed herself after wounding three people with a handgun at YouTube headquarters Tuesday afternoon, authorities said.

A law-enforcement source told the Bay Area News Group on Tuesday afternoon that the shooting appeared to have been fueled by a domestic dispute and that the suspect was targeting her boyfriend. However, San Bruno police later said they were still trying to determine the motive of the attacker, Nasim Aghdam, and that there was no evidence she knew any of her victims or targeted anyone in particular. Her father on Tuesday night told the Bay Area News Group that she was angry at YouTube because it had purportedly stopped paying her for her videos posted on the platform and that the firm was censoring her.

San Bruno Police Chief Ed Barberini said the shooter was found dead from an apparent self-inflicted gunshot wound.

Barberini said police were called at 12:46 p.m. to the online video giant’s Cherry Avenue campus for reports of gunfire, and three officers who arrived at the scene within two minutes were met by a multitude of fleeing employees.

“It was very chaotic, as you can imagine,” Barberini said.

The gunfire took place in an open courtyard, he added.

Employees were eating lunch when the “horrific act of violence” occurred, said Sundar Pichai, CEO of YouTube’s parent company Google, in a note to employees that Google posted on Twitter.

Barberini said officers soon found a victim with a gunshot wound near the entrance. YouTube employees stood watch over that person, freeing up the police to go further into the scene, he said. Police came upon the suspected shooter in an outdoor patio, dead from an apparent self-inflicted gunshot wound. Officers eventually found two other shooting victims, and Barberini affirmed that there was no longer any active threat.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our new Morning Report weekday newsletter.

“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,” Barberini said.

Zuckerberg San Francisco General Hospital has acknowledged receiving patients from YouTube, but the range of their injures was not fully disclosed.

Zuckerberg San Francisco General Hospital spokesman Brent Andrew said the facility has received a 32-year-old woman in serious condition, a 27-year-old woman in fair condition and a 36-year-old man in critical condition.

YouTube CEO Susan Wojcicki tweeted just after 6 p.m. Tuesday that there were “no words to describe how horrible it was to have an active shooter @YouTube today.”

Trauma surgeon Dr. Andre Campbell declined to detail the victims’ wounds, but said none had undergone surgery as of Tuesday afternoon. He added that the male victim’s critical status stemmed from blood loss.

Campbell said all of the patients are awake, and “shocked like we are.” He also lamented the occurrence of yet another multiple-casualty shooting, and added that gunshot victims are a regular instance at his hospital.

“We have a serious problem we need to address,” Campbell said.

Dr. Andre Campbell, trauma surgeon: “This is unfortunate and it continues” he said, naming other mass shootings. #youtubeshooting pic.twitter.com/05prFnhFAG — David DeBolt (@daviddebolt) April 3, 2018

Joe Fragola, a spokesman for Kaiser South San Francisco, said that facility has received a female victim, but that she was not shot, and suffered a possible sprained ankle.

Michael Finney, a 21-year-old supervisor at Carl’s Jr. across the street, was in the bathroom during the shooting and didn’t hear anything until he came out and saw a woman in the booth near the front door bleeding from the calf with two friends frantically trying to stem the bleeding.

He rushed over to help.

“I saw the lady was shot in the calf,” he said. “Her friends were trying to put pressure on the wound.”

At first they used the victim’s own sweatshirt, twisted it tightly and tied it above her calf but it wasn’t helping.

“Everyone was figuring out what to do,” said Finney. “I was trying to stay calm and see what I could do. Everybody is shocked.”

Finney then ran into the office and rummaged through the desk and cupboards. He first came out with rubber bands that are used for rolling money.

“I tried rubber bands at first and of course it didn’t work,” he said.

He raced back to the office and found a bungee cord, and they wrapped it tightly above the victim’s calf until the paramedics arrived.

Finney said the woman looked to be in her 20s and was calm as they tried helping her.

Erick Zaragoza, a 22-year-old student from nearby Skyline College, had pulled into a restaurant parking lot half a block from YouTube headquarters when he heard the shooting.

“It had to be at least 15 gunshots,” he said. “I’m seeing people running and thinking, what’s going on?”

Zaragoza said one of the chefs from the restaurant approached him and said there was a woman with a gun firing at people on YouTube’s patio.

After that, Zaragoza went to a nearby Carl’s Jr. closer to the shooting scene, where he saw a female gunshot victim being treated in an ambulance.

“They had one lady in the ambulance. Her leg was bandaged up but she otherwise looked fine,” he said. “It was pretty crazy, honestly. I’m thinking what the hell?”

Asked about the chef who witnessed the shooter firing at people, Zaragoza said, “He looked out of breath. He said he was fine but there was a lady shooting.”

The chef told him there were many people on the patio, which worried him. The patio is on the Interstate 280 side of the campus and is located near the front of the building.

Police Chief Barberini said investigators were conducting a room-by-room, floor-by-floor search of the building, and would be working through the night. The coroner was on site, he said. He did not expect to provide any updates until Wednesday, he said.

San Mateo County Supervisor David Canepa lauded the police and citizen response to the shooting, and voiced confidence that the community will bounce back from the violence.

“I commend the YouTube employees who maintained their composure during this tragic event and the incredible response by law enforcement officers who quickly secured the campus,” Canepa said in a statement. “This is a resilient community that will recover with each other’s support. I assure the survivors that they will not be alone in their recoveries. ”

One YouTube employee tweeted from inside the headquarters saying he was barricaded inside a room until his room was evacuated.

“Heard shots and saw people running while at my desk. Now barricaded inside a room with coworkers,” tweeted the employee, Vadim Lavrusik.

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

From everyone at Apple, we send our sympathy and support to the team at YouTube and Google, especially the victims and their families. — Tim Cook (@tim_cook) April 3, 2018

My staff & I are closely following developments from the active shooter situation at YouTube HQ in San Bruno, CA. Thank you to our heroic first responders. Our Bay Area community – and all American communities – deserve real action to #EndGunViolence. — Nancy Pelosi (@NancyPelosi) April 3, 2018

My stomach sinks with yet another active shooter alert. I’m praying for the safety of everyone at YouTube headquarters. — Sen Dianne Feinstein (@SenFeinstein) April 3, 2018

YouTube purchased the San Bruno office park for $215 million in January 2016. YouTube’s headquarters, which is nestled between the Interstate 380 and Bayhill Shopping Center, can host between 2,500 and 2,800 workers.

The shooting comes as YouTube plans this month to modify its policy on gun sales. The popular video site announced it would ban content that promotes the sale of guns and accessories like bump stocks, which modify guns to fire rapidly. YouTube announced the new guidelines just days before last month’s March for Our Lives gun-control rallies.

The change sparked criticism from gun rights groups, like the National Shooting Sports Foundation, a firearms industry trade group, which called the new policies “troubling” and “worrisome.”

Check back later for updates to this story.

Staff writers David DeBolt, Emily DeRuy, Tatiana Sanchez and Kellie Ann Benz contributed to this report.

______________________________________________________

Correction: April 4, 2018

An earlier version of this article incorrectly stated, based on a law enforcement source, that the shooter was seeking revenge on an estranged boyfriend who worked at YouTube.