SAN FRANCISCO — A UPS employee opened fire inside one of the company’s package delivery facilities in San Francisco on Wednesday, killing three co-workers and then himself as officers closed in and workers ran frantically into the streets, police and company officials said.
Fleeing a barrage of gunfire, some workers sought refuge on the roof of the 4-story facility and others ran outside and pounded on the windows of a public bus, witnesses said.
‘‘They were banging on the bus and they were screaming, ‘Go! Go! Go!’’’ said Jessica Franklin, 30, who was riding the bus to work when it made a regular stop in front of the UPS facility. ‘‘As they got on the bus, they were all ducking.’’
Two other United Parcel Service employees were wounded in the shooting that prompted a massive police response in one of the city’s industrial neighborhoods, about 2 miles from downtown San Francisco, Assistant Police Chief Toney Chaplin told reporters.
Officials, UPS employees and witnesses described other scenes of chaos as shots rang out during a morning meeting before drivers were sent on their delivery routes. Neighbor Raymond Deng said he heard up to eight rapid gunshots.
‘‘They were all in rapid succession,’’ said Deng, a 30-year-old tech worker who lives across the street from the warehouse. ‘‘It was like tat, tat, tat, tat, tat, tat, tat.’’
Police arrived in minutes.
‘‘This was a frightful scene,’’ said Chaplin. He said officers found two victims outside and others inside and pulled the wounded to safety as they confronted the gunman, who was armed with an ‘‘assault pistol.’’
‘‘The suspect put the gun to his head and discharged the weapon,’’ Chaplin said, adding that police did not fire any shots during the operation.
Chaplin said police have not determined a motive and were interviewing families of victims and witnesses to piece together what led the gunman to act. He said authorities won’t release the names of those killed or the gunman until their next of kin are identified.
Mayor Ed Lee condemned the violence and praised authorities for a ‘‘very proactive response.’’
‘‘It could have been worse,’’ he said, ‘‘lives were saved today.’’
It was not immediately clear how many employees were at the facility, but UPS said the warehouse employs 350 people. The shooter and all the victims were employees, UPS said in a statement.
UPS driver Marvin Calderon told KNTV that he recognized the gunman as a fellow employee, but he did not know him personally.
‘‘I just started running out like crazy, like I’ve never run before,’’ Calderon told the TV station.
After the gunfire, auto shop owner Robert Kim said he saw ‘‘a mob of UPS drivers’’ running down the street screaming ‘‘shooter, shooter.’’
Deng watched from his window in the Potrero Hill section of San Francisco as workers fled the building shouting. He said another group of about 10 people gathered on the roof and held up their hands waving for help.
‘‘I saw police officers go up from the ramp and then storm the buildings,’’ he said. ‘‘It’s crazy.’’
The shooting came the same day a gunman opened fire on Republican lawmakers at a congressional baseball practice, wounding U.S. Rep. Steve Scalise of Louisiana and several others.