A judge told a man he sent home without penalty to contact him in a year and tell him about his "wonderful life".
Three months later, the man killed a 5-year-old girl.
"I want you to write to me in 12 months and tell me how wonderful your life is," Judge John Clapham told Kerry Charles Ratana in September last year at his sentencing for disorderly behaviour.
On Tuesday, Ratana, 25, was back in court - pleading guilty to the manslaughter of Sahara Jayde Baker-Koro in December.
Sahara - daughter of Ratana's partner, Chantally Baker - was found dead in her bed at her Napier home days before Christmas. Neighbours described screaming coming from the house about 1.50am.
One man said he heard people running to meet an ambulance and police as they arrived at the house.
"You don't expect to hear that," he said. "That poor child, that whole family."
The night before, Ratana was looking after the child while her mother was out.
Violence in Ratana and Ms Baker's relationship had brought the family to the attention of welfare agencies.
Three months earlier, Ratana appeared in the Wanganui District Court and said he wanted to turn his life around.
He was being sentenced for disorderly behaviour likely to cause violence and for breaching a community work order.
The offences each carry a maximum penalty of three months in prison or fines of $2000 and $1000 respectively.
During the sentencing, Judge Clapham asked Ms Baker, who was sitting in the public gallery, to "tell him what you need. You know better than me".
Ratana wiped away tears as he listened to the weeping woman tell him she loved him and wanted them to have a decent life.
She had stood at the back of the courtroom, looked at Ratana and told him she wanted him to change for himself.
"You can do it, I know you can. Please do it for us," Ms Baker pleaded.
Wiping his eyes with his hand, Ratana had quietly replied, "Yeah, I'll do it."
Judge Clapham told Ratana to put his best foot forward. He then convicted and discharged him without penalty.
"I want you to write to me in 12 months and tell me how wonderful your life is," the judge said.
Ratana and Ms Baker had moved to Hawkes Bay in an attempt to change his life.
On Tuesday, Ratana was back in court, this time before Justice Patricia Courtney in the High Court at Napier.
He pleaded guilty to a charge of causing the death of Sahara by assaulting her, thereby committing manslaughter.
Details of how Sahara died cannot be reported for legal reasons.
A neighbour, who did not want to be named, said the plea brought her some relief.
"It's good to see that finally something is happening, but until you see him sentenced, it's not all over."
She said the death was hard on her children, who went to school with Sahara.
Sahara lived with her mother, 7-year-old sister and 2-year-old brother and had just finished her first year at nearby Onekawa School.
Ms Baker has since returned to Wanganui with her children.
Jane Drumm, executive director of Shine, New Zealand's largest domestic violence organisation, said she felt only sympathy for Sahara's mother.
"It is tragic. Here is a young mum who was looking for love and will now never forgive herself.
"But it is someone else's responsibility. We have to think: Why did he hurt that littlegirl?"
Ms Drumm said there was still little information available about the background of the family, but there was no doubt that Sahara's mother was doing her best for the relationship.
The chief executive of the Child Matters abuse education charity, Anthea Symcock, said that generally, it was not unusual for someone to see the best side of their partner.
"Often there are sides of a partner that are positive and we want to believe that the person can turn their life around."By Edward Gay @edwardgay Email Edward, APN