A toddler died in a Southland house just five days after social workers sent him back there from hospital, despite knowing it was unsafe, records show.
The mother's partner, who pleaded not guilty to murdering the 17-month-old boy, was found dead in custody five weeks later.
The man, who was known to be violent and had a long history of convictions including for kidnapping, was only in the house because Child Youth and Family (CYF) had approved it.
All identifying details of the victim, partner or mother, including their names, have been suppressed by a court ahead of an inquest later this year.
The child's father and his family believe CYF failed the boy. They provided RNZ with emails and correspondence with officials, showing some of what happened, though the documents are redacted in many places.
However, the documents show social workers twice cleared the man to live with the boy and his preschool sister near Invercargill, in the weeks and days before the boy's death.
The boy was found dead in his bed at home in October 2015 and the man was charged soon afterwards.
The man's own family had raised warnings about him, saying he had been a good father to his own children but had begun using methamphetamine again and behaving violently in early 2015, after his children moved to the North Island.
When his family found out he had moved in with the victim's mother and her two children, they alerted the children's father, who called CYF more than once saying he feared for their safety.
However, the father was in prison for assaulting the woman, and the records show CYF and police downplayed his warnings.
Warning signs before boy's death
In mid-2015 the mother's partner was arrested, including for aggravated burglary and assault.
He was granted bail on the condition he was not allowed any contact with any children, but asked the court to let him return to the house with the woman and two children.
It has been reported that the Crown and police both opposed the request but CYF approved it after doing a risk assessment of the home.
RNZ understands that CYF's safety plan was that the woman not leave the children alone with her partner.
In September, the boy ended up in hospital with a fractured thigh, crushed fingers, a broken tooth and some bruising.
The hospital said the cause was unexplained, but records sent between hospital social workers and CYF show they considered the mother a suspect.
The file stated the boy and his sister were "unsafe", and that all precautions must be taken, including a 24/7 watch on the boy and his mother in hospital.
A day later, on 8 October, CYF and police agreed the boy should be sent home from hospital.
Five days later he died.
The police detective who made the decision, along with CYF, to send the boy home refused to comment on how he had come to that decision.
CYF refused an interview request and would not release its review of how it handled the case.
It might release a summary of the review later, when it was finalised, the agency said.
It briefed the father's family about the review, but the family said they had no reason to believe the agency would make any changes to ensure what happened did not occur again.
CYF, police and Corrections all cited the upcoming inquest as a reason they could not comment.