CCTV captured a "five or six" minute beating that left a man dead over a "drug deal gone wrong", a court has heard.
Gabriel Hikari Yad-Elohim is on trial for murder before a jury and Justice Gerard van Bohemen in the High Court at Auckland.
Michael David Mulholland's bloodied body was found in the stairwell at the Western Springs flats where he lived, on September 26 last year.
Yad-Elohim, 30, was arrested in central Auckland the following day.
In her opening address, Crown prosecutor Kirsten Lummis described the killing as a "drug deal gone wrong".
"[Yad-Elohim] was keen to get his hands on some drugs, his drugs of choice were methamphetamine and cannabis.
Lummis said it was Yad-Elohim's desire to obtain drugs which led to "the fatal events of that evening".
"The defendant beat Mr Mulholland to death."
However, the Japanese man and his lead defence counsel Annabel Cresswell are defending the charge and argue he is not guilty by reason of insanity.
The attack was sustained and brutal, Lummis said, with Mulholland suffering several kicks and stomps to his head.
Take your Radio, Podcasts and Music with you