SAN FRANCISCO — On the same day the nation’s attention was riveted by a gunman’s attack on members of Congress near the nation’s capital, three people were killed and two were injured in a workplace shooting Wednesday morning at a UPS facility in San Francisco, authorities said.

The alleged shooter at the UPS facility died after turning an assault pistol on himself after officers confronted him, San Francisco police said. The tragedy came only hours after a man unleashed a barrage of gunfire at Republican members of Congress practicing for a charity baseball game in Alexandria, Virginia.

Related Articles UPS shooting: Previous Bay Area mass shootings

Listen: Chaotic moments following UPS shooting in San Francisco

Saddened UPS employees return to work after deadly San Francisco attack In San Francisco, the suspect fatally shot three UPS employees and wounded two others at the UPS warehouse and customer service center in San Francisco, near 17th Street and San Bruno Avenue in the Potrero Hill neighborhood. Five others suffered minor injuries trying to get out of the building during the panic.

One of the victims was identified by the San Francisco Chronicle as 46-year-old Hercules resident Mike Lefiti, a longtime UPS driver. San Francisco police identified the other two shooting victims as Wayne Chan, 56, and Benson Louie, 50, both of San Francisco, KGO-TV Channel 7 said late Wednesday.

The shooting was reported shortly before 9 a.m., but police did not release any more details.

UPS spokesperson Steve Gaut confirmed that four UPS employees, including the shooter, had been taken to hospitals.

“The company is saddened and deeply concerned about affected employees, family members and the community we share,” Gaut wrote in a statement. “Our thoughts and prayers are with all those touched by this incident.”

Two firearms were recovered at the scene, said San Francisco police Sgt. Michael Andraychak.

A San Francisco police department official has identified the gunman as Jimmy Lam. The official spoke on condition of anonymity because the investigation into the shooting is ongoing.

The official said Lam is from San Francisco but had no immediate details on his background.

A union official said the gunman had filed a grievance complaining that he was working excessive overtime.

Joseph Cilia, an official with a local Teamsters Union, said Lam’s grievance filed in March requested that UPS relieve him of working overtime going forward.

Still, Cilia said Lam wasn’t angry, and he could not understand why he would open fire on his colleagues at a morning meeting on Wednesday.

Cilia said two other drivers who were wounded have been released from the hospital and will be OK.

Authorities secured the building, and a San Francisco Police Department special operations units searched the facility for additional victims and witnesses, according to the department.

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

Two bodies were found inside the UPS facility and two outside the building, police said. Authorities have not released identities of the slain.

Brent Andrew, a spokesman for Zuckerberg San Francisco General Hospital, said the hospital had received the victims, but he did not know exactly how many people or their conditions.

A witness said she believed the suspect was a driver who shot at other drivers during a morning meeting at the facility that operates as a packaging sorting hub and delivery center, according to ABC7.

Officials, UPS employees and neighbors described chaos and panic as shots rang out during the meeting.

“They were all in rapid succession,” Raymond Deng, a 30-year-old tech worker who lives across the street from the warehouse, said of the gunshots. “It was like tat, tat, tat, tat, tat, tat, tat.”

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

A UPS worker, who wished to remain anonymous, said he was working on the second floor when the shooting broke out on the third floor and did not hear the commotion. But he confirmed that the shooting happened at the morning roll-call meeting for UPS drivers. He said that he was friends with one of the victims, nicknamed Big Mike, a driver who he said died at the hospital.

He also said he knew the shooter, also a driver, whom he described as “a shy and quiet person” who he believes had been working for UPS for eight to 10 years.

“I was surprised because he was a quiet guy,” he said. “He didn’t talk much … and he killed himself, too, after he killed the others. … I don’t understand because he had a family. I feel so sad.”

He said several of his co-workers were crying, with heads down in shock and disbelief.

“I couldn’t believe it,” he said. “We never expected that.”

In a statement, San Francisco Mayor Ed Lee expressed gratitude for the first responders and sympathy for those who lost loved ones.

“I want to thank our brave officers of the San Francisco Police Department, and our dedicated employees at 911 and San Francisco General Hospital. I also want to offer my condolences and thoughts for the individuals and families affected by the senseless act of violence at the UPS facility. We all know the familiar faces of our local UPS drivers and delivery persons. Today’s tragedy will be felt in every community served by these committed employees.”

State Sen. Scott Wiener, D-San Francisco, also shared his thoughts.

“Praying for the shooting victims at the UPS facility in San Francisco. Way too many shootings in this country. It’s depressing,” Wiener tweeted.

The Salvation Army, Red Cross and other agencies were working together to provide counseling and support to employees still reeling from the shooting.

Reporter Harry Harris and The Associated Press contributed to this story.

The full text of the UPS statement, by Steve Gaut, following the shooting:

UPS confirms there was a shooting incident involving 4 employees within the company’s facility in San Francisco earlier this morning. Local law enforcement are conducting an investigation. We cannot provide information as to the identity of persons involved at this time, pending the police investigation. We understand that there are potentially multiple deaths, although some individuals were transported to the hospital and we are unsure of their status at this time.

The company is saddened and deeply concerned about affected employees, family members and the community we share. Our thoughts and prayers are with all those touched by this incident. The facility is an area package sorting hub and package delivery center. UPS employs 850 at the facility.