A uniformed UPS worker fatally shot three coworkers at a San Francisco shipping warehouse on Wednesday, before using the gun to kill himself.
Another two were wounded by gunfire, police said.
All five victims of the shooting, as well as the gunman, were employees of UPS's San Francisco facility, the company confirmed in a statement.
Multiple gunshots were fired inside the UPS warehouse on the corner of San Bruno Avenue and 17th Street just before 9 a.m., San Francisco Assistant Police Chief Toney Chaplin told reporters.
The motive remained unclear, police said. It was also unclear if the shooter targeted specific people in the building or shot randomly at coworkers.
Police were first called at 8:55 a.m. and arrived at an "active shooter situation," Toney said. They evacuated shooting victims as they searched the building.
By the time police arrived, he said, five people had been shot.
"One contact team located the suspect who was still armed with an assault pistol," Toney said. "The suspect put the gun to his head and discharged the weapon."
The identity of the shooter was not immediately released, nor were the names of the victims.
Inside, police recovered two firearms.
Toney said police were still interviewing "dozens" of witnesses who were inside the warehouse to understand what happened. Some of them, Toney said, were not UPS employees.
"Our investigators are going through painstaking interviews with everyone who was in the building," he said.
In a statement, UPS said two employees were being treated in nearby hospitals, but their conditions were not immediately known.
"The company is saddened and deeply concerned about affected employees, family members and the community we share," UPS said in a statement. "Our thoughts and prayers are with all those touched by this incident."
Counseling was being made available to all employees affected by the shooting, the company added.