Police and fire officials responded to reports of shots fired at the Long Beach Federal Building.
A fatal shooting in a Long Beach Immigration and Customs Enforcement office occurred as an agent was being counseled on his performance by a high-ranking ICE official, according to the FBI.
Authorities identified the gunman Friday as supervisory special agent Ezequiel Garcia, 45, and the victim as Kevin Kozak, 51, deputy special agent in charge of the Los Angeles area.
The shooting happened just before 6 p.m. Thursday on the seventh floor of the Glenn M. Anderson Federal Building in Long Beach, about 20 miles south of downtown Los Angeles.
Garcia was killed by another agent who intervened after Kozak had been shot six times. Kozak is in stable condition at a nearby hospital and is described as alert and talking.
"He is a fighter and I believe that's why he's alive today," said Claude Arnold, ICE special agent in charge. "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."
Kozak, the second in command of the Los Angeles area, had denied a request for an internal transfer request by Garcia, a federal official with knowledge of the investigation told The Associated Press. The official wasn't authorized to speak publicly but agreed to speak on condition of anonymity.
ICE Director John Morton visited Long Beach Friday. Morton spoke to reporters in front of the Long Beach building where the shooting took place about 24 hours earlier, praising the third ICE officer who heard the gunfire and shot and killed agent Garcia.
"This agent acted with extraordinary calm and took quick and decisive steps to deal with a very dangerous situation," Morton said.
Morton said the shooting has rocked the agency. Agent Kozak had 30 years experience in the agency working in San Diego and Miami. Garcia had nearly 25 years experience under his belt.
The FBI is investigating the shooting. That agency has not offered details about a possible motive.
There were conflicting early reports about the number of people shot, with local authorities saying two were dead and one wounded, while ICE said one was dead and one wounded.
The third agent is on administrative leave and his identity is being withheld.
The Long Beach federal building 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. That FBI has not offered details about a possible motive.
This story has been updated.