Troy Harris, a police spokesman, said officers attempted for more than 90 minutes to convince Samuel Crosby to drop his weapon, The Baltimore Sun reported. Crosby allegedly threatened to harm police, himself and the child.
Officers tried to wrest the machete from Crosby. In the fracas, an officer fired at him.
Anthony Guglielmi, spokesman for Police Commissioner Frederick H. Bealefeld, said the officer who killed Crosby, Garfield O'Toole, is a 13-year veteran of the police department assigned to the SWAT team. Crosby served a prison term for attempting to kill his wife and was freed in 2005, Guglielmi said.
"This is truly a heroic act on the part of this officer and his colleagues," Guglielmi said. "He saved the life of this little girl."
The girl was not hurt. One officer received a cut to his hand.
Notable deaths of 2014 [PHOTOS]