SAN FRANCISCO — Authorities say a shooter who opened fire at a San Francisco UPS warehouse today was armed with an assault pistol when police found him.

San Francisco Assistant Police Chief Toney Chaplin told reporters that officers found wounded victims and brought them to safety. When they found the gunman, he put the weapon to his head and shot himself.

Three people were killed as well as the shooter. Two others were wounded.

Police have not determined a motive, Chaplin said.

UPS spokesman Steve Gaut told The Associated Press that an employee fired inside the facility before the drivers were sent out to do their normal daily deliveries.

Auto shop owner Robert Kim said he heard about five to eight rapid gunshots. The next thing he knew, he said, “a mob of UPS drivers” was running down the street screaming “shooter, shooter.”

Police confirmed the shooting at the facility in the Potrero Hill neighborhood, about 2½ miles from downtown San Francisco, but didn’t release additional information.

Uniformed UPS employees were later led out in a line by officers next to a highway. They walked away calmly with emergency vehicles nearby and gathered outside a restaurant.

The shooting led to a massive police response and a shelter-in-place warning for the surrounding area.

It came hours after a gunman opened fire on Republican lawmakers at a congressional baseball practice in Alexandria, Virginia, wounding U.S. Rep. Steve Scalise of Louisiana and four others. Police killed the shooter in Virginia.