University of Otago science department library assistant Andrew Porteous' first novel, A Political Affair, has won the Kinglake Publishing Ltd Unpublished Author Competition ahead of hundreds of entries from around the world.
"I thought it was a joke when they told me I'd won," Mr Porteous said last Friday.
"It was just a bit of fun, really. I only entered on a whim, because I thought writing a crime novel would be fun."
Mr Porteous (33) said he had been writing plays for five years but had never turned his hand to novels.
"I wrote the book over the last couple of years, mainly to break up the pattern of writing plays. I'd write for a bit and then put it away for a bit."
He named his characters after Sherlock Holmes characters invented by Sir Arthur Conan Doyle.
"The detective is Lachlan Doyle and there's a 'Santow', which is an anagram of [Dr] Watson, and a 'Tramiroy', which is an anagram of [Prof] Moriarty," he said.
"It's set in Dunedin and it's about a prime minister who is having an affair with his personal assistant, when his wife finds out and murders her.
"The detective is part-Maori and a descendant of [early Dunedin settler] Thomas Burns.
"It's a pretty local story and for it to be picked up in the UK is bizarre."
The book will be published before Christmas and distributed by WH Smith in Great Britain.
"If it sold 100 copies, I'd be happy."
There were no immediate plans for it to be distributed in New Zealand.
Kinglake Publishing managing editor Harry Taylor congratulated Mr Porteous on his win.
"You have written an excellent tale and we hope that we shall see more of Lachlan Doyle."