Updated

The UPS employee who opened fire in a San Francisco package delivery facility killing three was identified as 38-year-old Jimmy Lam, authorities said late Wednesday.

Lam barged into the facility at around 9 a.m. local time and began shooting, police told Fox News. The building is located in the Potrero Hill, which is about 2 1/2 miles from downtown San Francisco.

Joseph Cilia, an official with a Teamsters Union local that represents UPS workers in San Francisco, told the Associated Press that Lam filed an overtime grievance in March complaining he was working excessive overtime. Cilia said he would not figure out why Lam would open fire on fellow drivers.

ups san francisco

UPS workers gather outside a UPS package delivery warehouse where a shooting took place. (AP)

"I never knew Jimmy to not get along with people," Cilia said. "Jimmy wasn't a big complainer."

Lam killed three co-workers before dying from a self-inflicted gunshot wound. Two other UPS employees were wounded, but have been released from the hospital, Cilia said. Both were UPS employees.

The victims have been identified as Benson Louie, 50, Wayne Chan, 56, and Michael Lefiti, 46, according to San Francisco's chief medical examiner.

The motive of the shooting is still unclear, police said, adding that they believe the incident was not terror-related. The FBI was aware of the shooting but did not intervene, the bureau told Fox News.

The shooting led to a massive police response, initiating a shelter-in-place for the surrounding area. The warning was lifted nearly three hours later after the incident was "contained" and the building was "secured," police said.

0615 sf ups

UPS workers gather outside a UPS package delivery warehouse where a shooting took place. (AP)

Officers found two victims outside the building and others inside and pulled the wounded to safety as they confronted the gunman, who was armed with an "assault pistol," San Francisco Assistant Police Chief Toney Chaplin said.

"The suspect put the gun to his head and discharged the weapon," Chaplin said, adding that police did not fire any shots. Two guns were recovered at the scene, he said.

UPS driver Marvin Calderon told KNTV that he recognized the gunman as a fellow employee but did not know him personally.

"I just started running out like crazy, like I've never run before," Calderon told the station.

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."

The Associated Press contributed to this report.