The Department of Corrections has to pay a former prison guard about $30,000 after she was unjustifiably dismissed for having an inappropriate relationship with an inmate.
The woman told the Employment Relations Authority she was manipulated and stalked by the prisoner but denies the relationship she had with the prisoner was inappropriate.
She said any suggestion the relationship was physical was "fiction".
The Department of Corrections said the guard was in an inappropriate relationship with the inmate, which breached the Corrections code of conduct.
• New Corrections Māori strategy: Prison should not traumatise inmates more than loss of liberty
• Sacked Northland Corrections officer fails to win job back
• Corrections officer who had testicles grabbed by elderly prisoner found to have acted egregiously
It pointed to 454 calls made from the prisoner to the guard's cell phone between February and May 2018 - some of which "strongly indicated an inappropriate relationship".
The ERA found there was grounds to consider dismissal but the process was unfair and the investigation flawed.
The woman was awarded three months' pay as compensation for lost wages, amounting to about $15,000, and $16,000 for hurt and humiliation.
The Department of Corrections was alerted to the alleged inappropriate relationship in mid-2018 when the man was released from prison and met with his parole officer.
The former inmate told his parole officer he had been in a relationship with the guard for about four months. He gave her address and phone number as an approved person on a prison document.
The probation officer informed the human resources department at the prison and it started investigating.
Records show the woman, who worked in the remand section of the prison, had received 454 calls from the inmate to her cellphone.
"Snapshots" of 20 phone calls were analysed and "clearly and strongly indicated an inappropriate relationship," the Department of Corrections said.
But the ERA found numerous defects in the process that followed - including notes taken at "informal meetings" used against the guard and failure to interview the guard's most immediate bosses.
Her immediate boss was in support of the woman and said she had made a "silly mistake".
There was a lack of investigation into the claim the prisoner had "stalked" and "manipulated the guard" and no support person offered at two of the early meetings.
The person appointed to investigate was not a manager - which was a legal requirement.
The ERA concluded the woman had "failed to exercise proper judgement in relation to the prisoner" but also that she had been drawn in by a confident and manipulative prisoner.
The guard said she "felt trapped" by the prisoner and said she tried to deal with the situation as best she could "including by humouring him".
The lawyer acting for the guard said the dismissal was the harshest option and sought reinstatement.
He said the Department of Corrections could have given the woman a second chance with additional "Getting Got" training, which taught guards how to deal with manipulative behaviour.
The guard said the dismissal had been "devastating" for her. She loved her job and it "was a cruel blow to be dismissed from her intended life career".
She said she was an honest person and this had been used against her during the employment investigation.
She had trouble sleeping and "cried constantly and stayed home to avoid fears she was being judged".
The ERA said the woman was "drawn in by a confident and manipulative prisoner and believed she could manage and control the emerging situation".
But it said she did not take the appropriate steps to deal with the "increasingly dangerous situation she found herself in".
Richard Waggott, from the Department of Corrections, acknowledged the findings of the ERA and said it was reviewing the relevant employment policies and procedures as a result.
He accepted the ERA found the guard was unjustifiably dismissed but pointed out: "The ERA did not reinstate this person's employment, citing they were not confident that the required levels of trust and confidence could be rebuilt and maintained."
Waggott said the Integrity Support Team that provides specialist advice on conduct among employees was under review.
"Getting Got has been replaced with more up-to-date training programmes for staff and contractors as a result," Waggott said.
"This includes training in Integrity at Corrections and Managing Manipulation and Deception."
Waggott said the majority of the department's 10,000 employees worked in challenging frontline prisoner and offender management roles and carried out their duties with integrity and professionalism.
"When they don't meet these standards, we take appropriate action."