Updated

Colleagues and investigators were at a loss Thursday to explain what drove a San Francisco UPS driver to pull out an assault weapon at work and kill three co-workers who police suspect he targeted.

Jimmy Lam, an 18-year veteran of UPS, appeared to single out the three slain drivers but investigators have yet to determine what set him off on Wednesday, an official in the San Francisco Police Department said.

The official was not authorized to discuss the case publicly and spoke on the condition of anonymity.

The violence ended when the 38-year-old Lam turned the gun on himself and took his own life as workers ran from the packing facility and police closed in.

As investigators worked to determine a motive, friends and colleagues recounted personal and professional troubles that Lam had experienced, including a number of driving violations.

He was convicted twice of driving on a suspended license in 2013 and 2014, according to DMV records. His license was also suspended in 2014 for negligently operating a vehicle.

Lam also had a run-in with the law in 2010, when he was convicted in San Francisco of driving under the influence and sentenced to three years' probation.

UPS spokeswoman Susan Rosenberg said she did not know details about Lam's driving record and would not comment. She added, however, that UPS drivers are expected to be able to drive legally.

There was no indication that Lam's driving record affected his ability to work at UPS.

In another matter, Lam filed a grievance in March claiming he was working excessive overtime, said Joseph Cilia, Lam's friend and an official with the union that represents UPS drivers. Cilia said Lam was upset with managers whom he accused of forcing him to work overtime.

But none of the men who were shot were managers, Cilia noted, adding that he knew of no disputes between Lam and the victims.

Shaun Vu, a senior UPS driver, said Lam struggled with depression and had personal troubles a few years ago that involved a dispute with a girlfriend over visitation rights for their young child. Vu said he encouraged Lam to seek counseling.

"I told him, you have a problem or feel bad about yourself or your life, the best thing to do is get professional help," he said.

Lam told Vu that he would speak with management and then took off work for several months. He seemed fine when he returned to work but Vu noticed a few weeks ago that Lam looked troubled.

"I just saw him passing by and asked how he was doing," Vu said. "He said something like, 'I'm hanging in there.'

"I don't think he had anybody he could talk to and it got worse and worse," Vu said.

Lam was a U.S. citizen who emigrated to the United States as a baby from Thailand, said Sharon Rummery, a spokeswoman for U.S. Immigration and Citizenship Services. She declined further comment.

Investigators said it remained a mystery to them why Lam went after co-workers he had known for years.

Determining the motivation behind workplace violence can take time, experts say.

"What appears to be workplace violence may be something else," said Chuck Wexler, director of the Police Executive Research Reform, a Washington D.C.-based police research group.

"That's why police really need to drill down into the person's background," he said.

The shooting occurred during a morning planning meeting before drivers set out on delivery routes.

Cilia said witnesses told him that Lam walked up to driver Benson Louie and shot him during the meeting. As his co-workers frantically fled the room, he shot Wayne Chan in the back and then walked up and "finished him," Cilia said, citing witnesses.

Victim Mike Lefiti was fleeing from the building when Lam went to a street and shot him, he said.

Lefiti, 46, and Louie, 50, had each worked for UPS for 17 years, according to the company. Chan, 56, had 28 years of service.

UPS employees paid respects to the victims at a memorial erected at the packing facility where the shooting had occurred a day earlier. People said prayers and signed a poster honoring their three longtime colleagues.

Vu described Chan as an expert handyman who would come over at any time to help him build a fence or repair an electricity outlet. Chan leaves behind a wife and two children.

Tributes also poured on social media for Louie, who was considered a legend in nine-man volleyball, a version of a game brought over by Chinese immigrant laborers who played in the streets. He left behind a wife and two daughters.

Mamie Wong said she had known Louie since they were in junior high school.

"He had a big, generous heart," she said. "He'd bend over backward for you. If you needed a place to stay, he would give you a place. If you needed a car to drive, he would give you a car.

"He's left a big hole in our hearts."

___

AP writers Sudhin Thanawala and Jocelyn Gecker contributed to this report.