A police prosecutor says he strongly opposed bail for the man who went on to fatally stab North Shore teenager Christie Marceau.
Akshay Chand was on bail on charges of kidnapping and threatening to rape Christie when he killed her at her family home.
When Chand first appeared on the kidnap charges, police prosecutor Adam Pell was counsel for the police.
Mr Pell used his own personal cellphone to access Google Maps and check Chand's potential bail address, as police documents didn't specify the distance between the victim and accused's addresses, he told Auckland District Court on Tuesday morning.
Mr Pell said he told Judge Barbara Morris the distance between the properties was "less than a kilometre" and "bail in any event would be inappropriate due to the serious nature of the alleged offending".
Mr Pell said bail was declined on that occasion.
Chand was bailed at a later hearing by a different judge.
His bail conditions included a 24-hour curfew. Chand was banned from leaving the house unless in the company of his mother or aunt and only then for medical and legal appointments.
The court also ordered him to stay away from Christie.
The day Chand killed the 18-year-old, he walked to her house armed with a knife and hammer. He cornered her in her own backyard; stabbing her repeatedly, the court heard.
Christie died in her mother's arms and Chand stood calmly by waiting for the police to arrive.
He later told them he'd written a "really phoney" apology letter to the judge in order to get bail and planned to kill Christie when he was released.
Chand was found not guilty of murder on the grounds of insanity and sent to a secure forensic mental health unit.
The inquest is looking into what information Judge David McNaughton had access to when he made the decision to bail Chand, the conditions of that bail, and how Chand was monitored and supervised after his release.
It does not have the jurisdiction to review the actual decision to bail Chand.
Mr Pell says it was his clear understanding Judge Morris declined Chand bail at his first appearance on September 9, 2011.
He says he recorded "bail declined" on the coversheet of the prosecution file.
Mr Pell said he heard the judge use the words "declinature of bail" and he wrote down "words to the effect of Mr Chand being a direct danger to the victim.
"Her honour indicated that a further bail application may be considered by way of EM (electronic monitoring) bail."
Mr Pell said Judge Morris ordered that her decision be transcribed and sent to the police and others.
The police prosecutor told the coroner's inquest he had nothing to do with Chand's second appearance.
But he says by chance he was in court when Chand appeared a third time on September 29, when Chand's defence lawyer Mary-Anne Lowe sought bail again.
Mr Pell said he was surprised by that and asked Ms Lowe what circumstances had changed.
He says she "responded by stating that bail had not been declined by Judge Morris and there was no change of circumstances"
He says they checked the court file, but there was nothing he could recall seeing that indicated bail had been declined.
"Ms Lowe then stated to me (paraphrased) she was correct, bail had not been granted, and that Judge [David] McNaughton had indicated bail would be reconsidered on receipt of a positive forensic report."
Mr Pell said once again he firmly opposed bail and Chand was again remanded in custody.
He said he was so concerned about the prospect of Chand getting bail, that he requested a transcript of Judge Morris's earlier decision in which he believed she declined bail and also asked the police to make a transcript of their interview with Chand available for the next court appearance in October.
Mr Pell wasn't at Chand's next appearance, but was told the interview transcript and other documents were given to the court registrar for the judge, but they were returned to the police "within minutes".
Judge David McNaughton granted Chand bail on this occasion.
Mr Pell said as far as he was aware at that stage, they still had not received the original judge's transcript he requested from the court.
About a month later he was told that Christie Marceau has been killed by Chand.
He says after Christie's death he got the full court file and it showed the original judge, Barbara Morris had indeed declined bail.