LONG BEACH, Calif. (AP) -- It had all the ingredients of workplace violence: a manager, an angry employee, a discussion about job performance and at least one gun.
But in this case, both people were federal agents. And when gunfire erupted in a government office building, a third agent drew his handgun and took out the shooter, helping save the manager's life.
Investigators on Friday were still piecing together the details of Thursday's chaotic scene at the Immigration and Customs Enforcement office in Long Beach.
The confrontation apparently began during a discussion involving Kevin Kozak, the agency's second-in-command for the Los Angeles area, and a lower-ranking supervisor agent named Ezequiel Garcia.
At some point, the discussion escalated, and Garcia pulled out his weapon and fired. Kozak was hit six times, in the upper torso, legs and hands.
Kozak was hospitalized Friday in stable condition and was described as alert and talking.
"He is a fighter, and I believe that's why he's alive today," said Claude Arnold, the ICE agent in charge in Los Angeles. "He refused to succumb to his injuries, and in law enforcement that's what makes the difference between people who go home at the end of the day and those who don't."
After Garcia fired, a nearby agent drew his own gun and fatally shot the attacker.
Arnold said he wasn't aware of any issues between Garcia and Kozak.
"We are doing everything humanly possible to understand why it happened and to ensure it will not happen again," he said.
The third agent, whose name was being withheld, was placed on administrative leave.
A federal official with knowledge of the investigation told The Associated Press that Kozak had denied a request for an internal transfer request by Garcia.
The official spoke on condition of anonymity because he was not authorized to discuss the investigation publicly.
Kozak has served in his current role since 2004 and has worked as a civil servant for nearly 30 years.
Garcia initially worked for the now-defunct Immigration and Naturalization Service and was promoted in 2004 to be a supervisor within ICE.
He was a plaintiff in lawsuit against the Los Angeles Police Department after he and another ICE agent claimed they were roughed up by five officers while doing undercover work. A federal jury found in the police officers' favor in 2005, saying they did not use excessive force against Garcia and the other agent.
The Long Beach federal building, about 20 miles south of Los Angeles, houses ICE, the Internal Revenue Service and the U.S. Probation and Parole Office.
Along with the FBI, the shooting was being investigated by ICE's Office of Professional Responsibility and Long Beach police.
Associated Press Writer Shaya Tayefe Mohajer contributed to this report.