The kākāpo evolved two different colour types millions of years ago to avoid predators, genome sequencing has revealed.
The flightless parrot's olive colouring first appeared nearly two million years ago, coinciding with the evolution of two now-extinct predatory birds, the Haast's eagle and Eyles' harrier.
The new research from the Department of Conservation, Ngāi Tahu and German research group Helmholtz AI - published on the website PLOS (Public Library of Science) Biology - found the colour variation survives, with the birds coming in one of two colours - green or olive - in roughly equal numbers.
The birds are critically endangered, with roughly 250 individuals alive today.
The researchers analysed genome sequence data from 168 individuals, representing nearly all living kākāpō at the time of sequencing.
The study's authors said understanding the origin of the birds' colouring could be relevant to conservation efforts for the species today.
The report showed without intervention, kākāpō color variation could be lost within 30 generations.
Co-author Andrew Digby said using a comprehensive genomic library for the species explained how the current kākāpō colours might be a result of pressure from extinct predators.
"Using genomics to understand the current significance of such characteristics is important as we seek to restore the mauri (life force) of kākāpō by reducing intensive management and returning them to their former habitats."