Sir Peter Williams QC, a colourful and sometimes controversial legal defender, has died in Auckland, aged 80.
He was involved in some of the country's most high-profile criminal cases over the past 50 years, and was a tireless campaigner for prisoners' rights and penal reform.
Sir Peter grew up in Feilding and received his law degree from Auckland University, qualifying as a solicitor in 1958.
He had strong opinions about justice and the underdog - motivated, he said, by reading Dostoevsky's Crime and Punishment and by his own experience.
As a student, he had been caught driving a motorcycle under the influence of alcohol and was sentenced to 10 days' jail. He described it as the most traumatic but instructive period of his life.
Series of famous cases
Over his long career in the law, he acted in several famous cases. He defended Ronald Jorgensen for his part in the so-called 1963 Bassett Road machine gun murders, and Roy Rau, who had stabbed his estranged wife 20 times.
Sir Peter offered insanity as the defence in the latter case, but Mr Rau was found guilty.
On appeal, Mr Rau was granted a retrial and Sir Peter won the right for an all-Maori jury. Mr Rau was found not guilty on the grounds of insanity and held in Oakley Hospital for 12 years. Sir Peter claimed the prolonged incarceration was unlawful, unnecessary and maliciously inspired.
In one of his most famous cases, Sir Peter took on the police to defend Arthur Allan Thomas, who was twice convicted of the 1970 murders of Harvey and Jeanette Crewe.
He took Mr Thomas' case to the Privy Council and represented him at the royal commission of investigation that followed his pardon.
The royal commission resulted in heavy criticism of the police investigation, and Mr Thomas was awarded almost $1 million for nine years of wrongful imprisonment.
Another case that came to define Sir Peter's career was his successful defence of Terry Clark, later known as Mr Asia, on his first drugs charges in the late 1970s.
His career was placed under a cloud for some time because of his supposed fraternising with Clark. He was asked to explain a retainer of $30,000, paid to him by Clark, to the Auckland District Law Society - but was cleared of any improper behaviour, and later became a Queen's Counsel.
In the last few years of his career, Sir Peter was still involved in controversial cases.
In 2007, he was retained by Tuhoe to look into suing the police over the raids that had led to charges of suspected terrorism activity against them.
He also represented New Zealand First Party leader Winston Peters at a parliamentary privileges committee hearing on donations to his party, following the election of 2008.
He retired in 2010, still taking aim at the legal system and at what he called the creeping collusion between the police and government forensic scientists.
He had a lifelong concern for prisoners' rights and about the justice system, believing evidence was often not properly examined before a case went to court.
Tireless campaigner for prisoners' rights
Sir Peter held very strong views on penal reform, prisoners' rights and incarceration and led the Howard League for Penal Reform for 30 years, before setting up the Prison Reform Society.
With great sadness we learn Peter Williams has died. He was a Howard League stalwart. Rest in peace, our dear friend. Canty, Welly, Dunedin.— Howard League NZ (@HowardLeagueNZ) June 9, 2015
He spent his career defending people who had fallen badly foul of society's rules. He believed that crime was an aberration and was puzzled by what he saw as the public's obsession with locking up people.
"The strange thing about human beings is that, if they are successful, if they start to make a bit of money - legitimately I'm talking about - they become good citizens," he once said.
"You don't achieve a decrease in criminality by just locking people up, throwing the key away and treating them worse than you'd treat an animal."
He was also a veteran protester - he sailed his yacht to Mururoa Atoll to protest against French nuclear testing in the 1990s.
He was the author of several books, including The Dwarf Who Moved, and was a recipient of the New Zealand 1990 Medal.
Sir Peter was diagnosed with prostate cancer in 2006.
He was made Knight Companion of the New Zealand Order of Merit for services to law in the 2015 New Year Honours.
Due to his ill health, a special investiture ceremony was held at his own home in Auckland in April.
Sir Peter, who married several times, is survived by family including his three children.