Concern for freedom of speech compelled Nicky Hager to write his latest book, Dirty Politics, he told a Wanganui audience.
The Wellington writer had top billing at last weekend's Whanganui Literary Festival and spoke to about 180 people on Friday night.
He's written six books, on subjects as diverse as genetic engineering and international spy networks - but all involving politics.
Dirty Politics came out before the last election, and he did not realise it would create such a stir.
He had started the project because he sensed something was changing.
He was watching a "free and vigorous democracy" in action, but hearing a lot of silence - there were plenty of "spin doctors and paid voices" out there, but other people were too frightened to talk.
He sensed an active programme to discourage people coming from government.
Some of the more active voices were David Farrar with his Kiwiblog and Cameron Slater's Whale Oil Beef Hooked blog.
Mr Hager said the Whale Oil blog would smear people, often deterring them from politics.
Mr Hager had a friend inside the National Party and heard of someone who had illegally hacked Mr Slater's computer. He made inquiries and found out that publishing the contents would not be illegal, provided they had enough public interest.
He contacted the hacker, dubbed Rawshark, and found an unusual but likeable person.
Sifting through the hacked material, he found attacks on public health figures in support of the interests of the alcohol and tobacco industries, and faction fights inside the National Party. Some of the material could be traced to Jason Ede, who worked in the Prime Minister's office and has since resigned.
Mr Hager concluded people were paying Mr Slater to put up some of the content.
He rushed to finish the book before the election, but launched it quietly, fearing legal injunctions banning publication.
It struck a chord with others and created a pre-election "firestorm".
It didn't change the result of the election, Mr Hager said. But it did change the way people saw Prime Minister John Key, reassured people that Mr Slater's attacks weren't personal and lessened the impact of his blog.
It also energised a "rundown, unhappy" news media.
Most people had a positive response to the book.
He said although it contained bad news, the book was positive because it pointed out that politicians could choose to tell the truth, answer questions and treat people well.
He is now awaiting a judge's decision on whether it was legal for police to search his house in an effort to identify his confidential source.
But he said they would never find his sources, and he would appeal the decision if it went against him.