Kahu drove away with no lights on when police saw him and asked him to stop.
"Instead of stopping, you took off at speed, hitting a fence and driving through a stop sign before losing control, spinning out and crashing into a parked car," Justice Moore said.
Kahu's associate suffered a shoulder injury in the crash and later gave himself up to police.
Police planned to arrest Kahu on March 24 when he was due to report to probation.
Instead, about 8am, police received a call about someone loitering in the back of a residential property in central Whanganui.
Police, including armed officers and a dog handler set up a cordon in and around Plymouth St.
About this time, Kahu went to the door of a victim, whom Justice Moore referred to as AB, with an imitation pistol and asked to be let in.
"AB unlocked the front door and you followed her inside. You say you told her that the gun was plastic but, as is obvious from what happened later, she believed it was real gun."
AB's partner was asleep in the bedroom at the time. Kahu held the gun in one hand and AB in the other and walked her from room to room looking out different windows.
Eventually Kahu climbed out a window and began to climb a neighbour's fence when police asked him to stop. He pointed the gun at an officer.
"Believing the gun was real, the police chased you and called on you to surrender. Instead you turned around and pointed the gun at them.
"Unsurprisingly, they shot you."
Kahu suffered injuries to his leg and the back of his head, and was taken to hospital where he refused treatment. Only after Kahu was shot, police realised he was carrying an air pistol modified to look like a Glock 17.
He told police he wanted to be shot.
Justice Moore said Kahu's background was "all too familiar".
He was exposed to alcohol and drugs from a young age, joined Black Power as a teenager and was first jailed when he was 16.
"Since that time, you've spent almost all of your time in jail," Justice Moore said.
He said Kahu struggled to cope with the stresses of returning to the community whenever he was released. "You return to what you know best: committing crimes."
Kahu's lawyer Debbie Goodlet said his pattern of offending was "diminishing over the years. The acts of violence and level of violence is diminishing."
"Considering Mr Kahu's attitude and response over the last two months to handling this sentencing process, he has behaved in a consistent and pro-social way on these issues."
However, Crown solicitor Michele Wilkinson-Smith said the balance had to weigh in favour of the safety of the public and Kahu posed a risk to the public and police.
"The Crown has real concerns of the prospect of someone being badly hurt."
Justice Moore said reports suggested in recent years there was "at least some emerging insight into how you can avoid reoffending".
He was showing a desire to rehabilitate and work on numeracy and literacy skills.
There was no evidence of premeditation in the March offending and it was a "spontaneous and impulsive act driven by panic and a total lack of judgement".
"That represents a change, albeit a modest one, in your usual modus operandi," Justice Moore said.
That and the potential for an extended supervision order was enough for Justice Moore to decline the Crown's application for preventative detention.
"Yours is a finely balanced case and I've thought long and hard about what I should do with you," he said.
"[The reports] do hold out a glimmer of hope and that is a glimmer of hope I am prepared to extend to you today."
Kahu will serve a minimum period of four years of his seven-year imprisonment sentence.