The jury in the Connor Morris murder trial has heard the accused sent a series of text messages at the time of the attack, when he says he was asleep.
Michael Murray is on trial for the murder of Mr Morris during a street fight in west Auckland in August 2014. He has denied the charge.
He initially told police he was asleep when the fight took place but barricaded his family in his house soon after, fearing for their lives.
The police interview was conducted four days after the killing.
Mr Murray said he went to bed between 7.30 and 8.30pm, but was woken in the early hours by the sound of windows smashing, and his partner rushing into the room.
"[My partner] said that someone up the driveway said that we were all going to die in our house and that's when I feared for the kids, so I sort of - I barricaded the door, make sure no one can get in just in case they're coming for us.
"Last thing I want is, you know, have the kids for the weekend and they die at my house - everyone else dies."
Mr Murray was also confronted with a series of calls and texts sent about the time of the killing, which he said he did not remember sending.
A video of a police interview with Mr Murray was played to the jury this morning.
In the interview, Mr Murray said he was asleep when Mr Morris died. He told the police he barely used his phone.
But phone records show a series of text messages and calls around the time of the attack asking someone to call him.
Police said the quick succession of texts implied it was very urgent.
In the interview the police also confronted Mr Murray with statements to the police from others who placed him near the scene. But he told police they were lying, and that he was with his kids.
After hearing the text messages he asked to speak to his lawyer and the interview ended.