Schizophrenic Gabriel Yad-Elohim was released from Auckland Hospital's mental health ward after doctors found he was well.
Seventy-two hours later he had stomped pensioner Michael Mulholland to death.
Today Justice van Bohemen called for an independent inquiry into Yad-Elohim's care and the decision to release him into the community.
Yad-Elohim reported to the Auckland District Health Board's emergency department on 17 September last year, saying he was hearing voices telling him to kill people.
He was given medication, and later transferred to the intensive care area.
The unit became full, with all 58 beds in use.
Yad-Elohim had been due for discharge five days later on 22 September but he could not get a WINZ grant for lodge accommodation.
He stayed an extra night before being sent to a respite centre in the community.
Three days later he was on Auckland's Karangahape Rd, off his medication and trying to score methamphetamine. Justice van Bohemen said Yad-Elohim met a woman, who took him to Mr Mulholland's apartment building.
"Ms Uru, who was known to Mr Mulholland, persuaded you to hand over $200 and to stay on the landing below Mr Mulholland's apartment while she bought the drugs for you. You say Ms Uru had told you Mr Mulholland had gang associations. You remained on the landing awaiting Ms Uru's return but she did not return. She had climbed over the balcony, clambered back to the ground and run away with your money."
When Yad-Elohim knocked on Mr Mulholland's door, the 69 year-old denied all knowledge of the drug deal.
"You then grabbed Mr Mulholland, head-butted him twice, dragged him out of the door-way on to the landing and punched him in the head. Mr Mulholland fell to the ground beside the wall, apparently already unconscious. He remained on the ground, inert, through the attack that followed.
"You attacked Mr Mulholland around the head, hitting him repeatedly with your elbow and fists before kicking and stomping on his head and body for around four minutes."
The attack didn't stop there. Yad-Elohim walked down the stairs, only to return and continue stomping on Mr Mulholland's body. In all he struck the elderly man at least 90 times.
He was arrested the next day by police and took part in a recorded DVD interview. During the interview Yad-Elohim could be seen raising his cup to the corner of the interview room. His lawyers said he was toasting the spirit of Mr Mulholland.
"Overall, your history is of a young man who has struggled to adjust to coming to New Zealand at an early age, struggled to cope with life at school and after school, has become dependent on drugs, alienated from your family, and increasingly delusional to the point where you do not acknowledge your Korean heritage or even your own mother.
His self-admission to the district health board's Te Whetu Tawera was his fourth visit to a mental health unit.
"Until these tragic events of 26 September, your interactions with mental health services succeeded in stabilising your immediate condition but did not provide for your long-term care. You became lost to attempted follow-ups and slipped between the cracks.
"Perhaps as a consequence, the extent of your illness and the fact that your psychosis was not only brought on by methamphetamine was not fully appreciated. It appears that only after you killed Mr Mulholland did you receive an extended period of clinical treatment."
He said while Te Whetu Tawera was not on trial, he had concerns about the treatment that Yad-Elohim received.
"While it is not for this court to direct, I consider a thorough examination should be undertaken of the circumstances that led to your release from Te Whetu Tawera. I say that not withstanding the review that has already been carried out of your discharge.
"I make no criticism of the management and staff of Te Whetu Tawera - they operate under difficult circumstances with finite resources. Nonetheless, the fact that you brutally killed a defenceless older man, days after being found to be suitable for release into the community, warrants external examination. It is particularly concerning that your condition has since been found to be considerably more serious then at the time of your release from Te Whetu Tawera."
Yad-Elohim's lawyers at trial argued that because of his schizophrenia, he did not know right from wrong. Today one of his lawyer's, Matthew Goodwin, said his client would be put in prison, instead of the Mason Clinic where he had been getting treatment.
"The baseline position is that there was a fundamentally flawed discharge from there. And I say that because they had a patient who clearly had problems and had been resistant to treatment and he could've received the injection and he didn't. That would have been the best way of ensuring that his medication was delivered."
"The tragedy of this case is that he wasn't kept there longer and there wasn't more done to try and straighten him out before he was released."
Earlier the court heard from Mr Mulholland's daughter who turned 32 today but said her life stopped with the death of her father.
"I went from never having been to a funeral to planning one and carrying my dad's casket."
She directly addressed Yad-Elohim in the dock as he sat blankly staring ahead.
"He was not a drug dealer, or a gang member, he was not vermin or weak. He was an old man, chilling in his house, having a beer, probably reading a book or watching TV. He was more likely asleep in his chair, when you guys came, as he would often do."
She said her father's greatest treasures were the gifts and letters he got from his children.
The Auckland District Health Board was contacted for comment and says a review of Yad-Elohim's care was carried out and found no substantial problems. However, the board has refused to release the report, sighting privacy grounds and will not comment further.