The Prime Minister's chief public servant Andrew Kibblewhite has told MPs he regrets his role in the public announcement of Roger Sutton's resignation, and he should have known better.
Mr Sutton resigned as chief executive of the Canterbury Earthquake Recovery Authority last year after a sexual harassment complaint against him was upheld.
He spoke at a news conference which Mr Kibblewhite attended as head of the Department of the Prime Minister and Cabinet.
But Mr Kibblewhite has told a parliamentary select committee his presence was misinterpreted.
"It was absolutely not my intention to in any way condone the behaviours that led to the complaint. I think with the benefit of hindsight I should have anticipated that, absolutely, and with the benefit of hindsight, I would do things differently another time."
Mr Kibblewhite said it was a wake up call for all chief executives that they had to work hard to make sure their departments were safe environments.
He also rejected any suggestion his department gave bloggers preferential treatment when they requested official information.
Labour's Kris Faafoi had asked him why the right-wing bloggers, Cameron Slater and David Farrar, received prompt replies from that department.