New Zealand's prime minister has announced he is to step down after eight years in the job.

John Key said he wanted to spend more time with his family, especially his wife.