The deadly shooting of a supervisor by an immigration special agent earlier this week in California is the latest blow against U.S. Immigration and Customs Enforcement, the law enforcement agency created after the 2001 terror attacks.

Its officers and agents have themselves been arrested for crimes, accused of improper relationships with informants, convicted in embezzlement cases, and more.

Insiders said ICE, which operates under the Department of Homeland Security, struggles to overcome internal friction and competing cultures among employees who worked at the different federal agencies that were combined nine years ago to form ICE: the former Customs Service in the Treasury Department and the Justice Department's Immigration and Naturalization Service.

Best Pix of the Week

"It was more like a hostile takeover and Customs clearly had the upper hand," said T.J. Bonner, a retired Border Patrol agent who has worked with ICE. He described the agency's formation as "an unfriendly merger."

Investigators were piecing together details of Thursday's chaotic scene at the ICE office in Long Beach. They said a supervisory agent, Ezequiel Garcia, shot Kevin Kozak, the agency's second in command, at least six times. Another agent, whose name was being withheld, fatally shot Garcia.

A federal official with knowledge of the investigation told The Associated Press that Kozak had denied a request for an internal transfer by Garcia. Kozak formerly worked at the Customs Service; Garcia worked for the now-defunct Immigration and Naturalization Service and was promoted in 2004 to be a supervisor within ICE.

Celebrities Who Once Were Undocumented

Beyond organizational squabbles among its employees, ICE has suffered public embarrassments:

—Frank Johnston, a former assistant special agent in charge in the Los Angeles area, was convicted in December of obstruction of justice and making false statements for lying about an informant helping with an organized crime and human smuggling investigation. Johnston and his wife, Taryn, are also facing charges that they schemed to have her paid for a job with ICE that she didn't actually work. Prosecutors have accused the couple of illegally obtaining $582,000 in salary and benefits over several years. Both have denied wrongdoing.

—A former ICE intelligence analyst in El Paso, Texas, was sentenced last month to one year in prison in an alleged embezzlement scheme. A second former analyst and a former agency contractor have pleaded guilty to related charges. The then-ICE deputy director of intelligence in Washington, James M. Woosley, was suspended last year as part of the investigation.

—Federal agents searched the Los Angeles office of assistant special agent in charge George Guzman in 2009 to help determine whether he lied on his resume about his education. Guzman did not immediately respond to a request for comment sent to his DHS email address Friday.

—Another federal agency, the Drug Enforcement Administration, accused ICE agents in 2004 of allowing more than a dozen murders to take place in Ciudad Juárez, Mexico, and for endangering the lives of DEA agents and their families. The DEA said ICE used "a homicidal maniac" as an ICE informant even after he was implicated in the murder of an associate of the Juarez cartel in Mexico.

—An ICE deportation officer was accused in October of leading authorities on a high-speed desert chase in Arizona as he threw bundles of marijuana from his government truck.

Other ICE agents have been investigated for drunken driving in government cars, lying to other investigators and misusing their position for personal gain. One was investigated for having an inappropriate relationship with the target of an ICE investigation. Another was investigated for using his government position to ask questions from Texas about his mother-in-law's eviction in New Mexico.

Julie Myers Wood, who led ICE from 2006 until November 2008, noted that other law enforcement agencies also have suffered embarrassing episodes.

"Every large organization struggles to ensure that it avoid problems with misconduct," Wood said. She added that the scope of the agency's work — ICE enforces more federal laws than any other law enforcement agency — and its focus on immigration enforcement may keep it in the spotlight.

"Merging the two agencies has been and will continue to be a significant challenge," Wood said. "A lot of progress has been made, but there is still a lot to do.

Based on reporting by the Associated Press. 

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino