Prime Minister John Key personally phoned Solicitor General David Collins to pass on his gratitude for work on the so-called teapot tape case, two days before the election.
The Solicitor General's office is meant to be kept strictly independent from all political influence.
However, an email obtained under the Official Information Act showed Collins wrote to an unnamed counsel saying: "The PM phoned this morning and asked me to pass on to you his personal thanks for your work on Ambrose. He was very complimentary notwithstanding my attempts to say you were just doing your jobs! Well done. D "
The email is dated November 24 and referred to Bradley Ambrose, a freelance photographer who left an electronic device on a table, inadvertently recording a conversation between Key and Act Party leader John Banks.
A separate Official Information Act request was sent to the Office of the Prime Minister seeking a record of all correspondence pertaining to Key's conversation at Urban Cafe and the subsequent inquiry and High Court case.