The shooting occurred Thursday at about 6 p.m. at the Glenn M. Anderson Federal Building at 501 W. Ocean Blvd.
The violence unfolded on the seventh floor of the downtown Long Beach building, which houses Immigration and Customs Enforcement (ICE), the Internal Revenue Service and the U.S. Probation and Parole Office.
According to the FBI, an ICE agent shot and injured a co-worker, and a third agent who worked in a nearby office intervened, drew his weapon and killed the shooter, identified by officials as 45-year-old Ezequiel Garcia, an ICE supervisory special agent.
Investigators say the victim was the second in command in the region and he may have been targeted for rejecting a transfer request by Garcia. A federal official identified the victim as 51-year-old Kevin Kozak, a deputy special agent in charge of the Los Angeles area. He was shot six times. Kozak was listed in stable condition Friday night.
Garcia had apparently requested an internal transfer, which was denied by Kozak, who was not Garcia's direct supervisor.
The name of the agent who fired the final rounds were not released.
Agents with ICE are calling the shooting incomprehensible.
"We are like a family in this agency in law enforcement. When something like this happens, it impacts us all, but in the face of tragedy and adversity, we are strong. We support one another and we're here for each other," said Claude Arnold, an ICE special agent.
Kozak suffered multiple gunshot wounds and was transported to an area hospital where he was listed in stable condition. The third agent who killed the shooter was not injured.
"I'm sure that will be the talk of the office, and probably the upper management will be making sure that everybody is OK and feel safe that we're here today," said Kim Speech, who works on the fourth floor of the federal building for the Department of Commerce. She said she left work just minutes before the shooting occurred.
"I think it just describes the day and the time that it is now, that there is a lot of violence everywhere. So, just because this is the federal building and it's probably more secure than a lot of these other buildings around here, it doesn't make it completely 100 percent safe," Speech said.
Tracey English of Lomita was a passenger on a local bus that passed by the federal building when the shooting happened. She said she couldn't believe something like this occurred between agents in a federal building.
"I was actually scared because I've never seen anything like that really. All I could do was pray for the whole situation," said English.
The seventh floor of the building has been completely shut down as investigators gather evidence. The national director of ICE is expected to arrive in Long Beach sometime Friday to provide support.
The Associated Press and City News Service contributed to this report.