Sian Elias received a letter from Patrick O'Brien in which he claimed to have lied under oath. Photo / Mark Mitchell

Sian Elias received a letter from Patrick O'Brien in which he claimed to have lied under oath. Photo / Mark Mitchell

Police have hired one of the country's top lawyers to investigate a former officer's stunning confession that he lied in court - and wrongfully sent at least 150 people to prison.

Patrick O'Brien wrote to Chief Justice Dame Sian Elias admitting to perjury, saying he was racked with guilt after carrying a "dreadful secret" for more than 30 years.

Now nearly 60, O'Brien was an undercover agent in covert drugs operations in the 1970s, immersed in a dark, criminal underworld, and the star Crown witness in the resulting court trials.

However, O'Brien says he lied on oath every time he took the stand.

In the confession letter, he said he could not guess the number of people with convictions or imprisoned "because of my lies", because he stopped counting arrests at 150, halfway through his three-year stint.

All but one of the juries - in a case where the Crown failed to prove a substance was a narcotic - returned with a guilty verdict.

Leading Wellington lawyer Bruce Squire, QC, has been hired by Police National Headquarters to investigate the allegations independently.

Squire, who also investigated allegations into the police undercover work in 2004, did not return Herald on Sunday calls.

In his confession, O'Brien told Dame Sian he answered to the "grey men" who trained him, on whose orders he lied to obtain the convictions at any cost.

"They called it Doomsday work and instructed me to take this dreadful secret to the grave," O'Brien wrote.

"In every case I lied to the courts and I lied to the juries to obtain convictions against my targets.

"Telling lies was easy - 'policemen don't tell lies' - and my targets never stood a chance."

Tampering with evidence was also common, he said. Often the exhibit before the court was not the drugs that he bought from the target.

He also deceived his operators, usually high-ranked detectives stationed in the communities where O'Brien operated undercover.

"Most of these men were tough (real tough) but without exception they were honest and would have brooked no time for the methods I employed to obtain convictions," O'Brien wrote.

Eventually, the shame and stress of the work broke O'Brien. He resigned from the police and fled New Zealand, "haunted, traumatised and scared".

"My life since has been a tragic waste; running, always running, but never able to lose the demons that rush around in my head.