Child, Youth and Family says a child in the agency's custody, was removed from a home, hours before a man was killed there.
A woman, 45, has been charged with the murder of Tom Joe Rohia, 56, who was attacked in the suburb of Mt Roskill, Auckland, on 13 April.
Child, Youth and Family says the child, aged seven, was living in the house with her mother and was allowed to remain there as long as the man was not there.
Agency head Ray Smith says CYF social workers visiting the house discovered he was there and immediately removed the girl. She is now with a caregiver.
Mr Smith says he is relieved the girl was removed before the assault on her father.
He says social workers were threatened and abused when they arrived at the house and decided the child should be removed, with the help of police.
The woman is due to reappear in the Auckland District Court on 30 April. Her name is suppressed.