On the go and no time to finish that story right now? Your News is the place for you to save content to read later from any device. Register with us and content you save will appear here so you can access them to read later.

As Kerikeri solo dad Neil Arthur Phillips entered the dock for sentencing on dope dealing charges, his two teenage sons rushed over from the public gallery to give him a hug.

Such contact between prisoners in the dock and those in the public gallery is usually frowned upon by the judiciary, but this spontaneous show of love helped save Phillips from going to jail by the "narrowest of margins".

Phillips, 49, appeared for sentencing in the High Court at Whangarei before Justice Paul Heath after earlier pleading guilty to six charges of selling cannabis and six of possessing cannabis for supply.

He was caught in Operation Dan, an undercover police sting targeting drug dealers from November 2011 to June this year.

Justice Heath said Phillips was an enigma who had two sides to his character. One was a loving father who had done a great job of bringing his two teenage boys up by himself - the other was a man who had alcohol and drug issues and took part in illegal activities.

An undercover officer visited Phillips' Kerikeri home six times over two months, buying $50 bags of cannabis, but Phillips also said he could supply 28-gram bags.

Crown prosecutor Catherine Anderson asked for a starting point of three years' jail with six months added for Phillips' previous drug convictions, which went back over 20 years.

Defence lawyer Doug Blaikie sought a starting point of two-and-a-half years' jail, with reductions for his guilty plea and mitigating circumstances taking it down to two years, which would open the door for home detention.

Mr Blaikie said Phillips sold cannabis to help bring up his children and the undercover officer put huge pressure on him to sell him the drug.

Phillips had also been in custody for several months and the cannabis sold was worth only about $1630, Mr Blaikie said.