The deputy mistook Frank Mendoza for the man during the eight-hour siege that ended with SWAT officers storming a home in the suburb of Pico Rivera, California, and killing the suspect.
William McSweeney, Los Angeles County sheriff’s detective chief, said the suspect traded gunfire with officers who were trying to arrest him and broke into Mr Mendoza’s home through a back window.
Deputies went to the front door to evacuate the residents when the man fired at them.
The deputies had to run for cover, and within seconds a man ran out of the door.
Mr McSweeney said a deputy fired at the man, who turned out to be Mr Mendoza.