A pilot programme at Hawke's Bay Regional Prison is saving dogs earmarked to be put down and giving them a "second chance" at life.
They are chosen and taken from their own death row and into the care of prisoners, who train the pets for six weeks before they are put up for adoption.
Similar programmes are well established in the US and the Hawke's Bay version - now in its fifth week - was the brainchild of dog behaviorist and trainer Steve Dunworth and established in conjunction with Adopt A Dog.
Trained in Australia, Mr Dunworth had seen the effects similar programmes had overseas. A trained dog is much more likely to be successfully adopted than one which is not.
"I'm totally freelance, so I don't actually work for the prison but I put this programme together and presented it to them and they said: 'fantastic'," Mr Dunworth said. "The first day I came in with the dogs, the guys put on a fantastic welcome and I thanked them then on the dogs' behalf, because they've saved a life."
To train the dogs, prisoners use a clicker. Over time, the sound of the clicker becomes associated with a treat. It is then used as a type of reward system for the animals. It is a method Mr Dunworth describes as reward or no reward, and without a form of punishment.
For some hardened prisoners, it is the first time they have a feeling of true affection. But with a number of men serving life or preventive detention, prison authorities would be keeping a close eye on how the emotional connection would affect the men when it was their dog's time to leave.
One prisoner said he didn't look at it as "saving a dog's life" but as "giving it a family". In turn, he felt it gave him companionship and a sense of responsibility.
"I feel I'm pretty close to her, but at the same time I can't get too attached," he said. "I've got to know where to draw the line because I know she's going to be gone anytime now."
Adopt a Dog director Trina Bergloff-Howes said she had met Mr Dunworth in October 2010, and the programme had been "all he's ever talked about".
She was thrilled with how it had gone so far, as it enabled the "really unwanted, harder to place dogs" to be put out for adoption.
"It enables those dogs to have a second chance and be homed," she said. "They're here because of this programme."
When selecting dogs to be used in the programme, Mrs Bergloff-Howes said characteristics included a good temperament, dogs which were comfortable around humans, approachable by strangers, and were affectionate and responsive.