Studies of a distinctive wading bird have identified a genetic quirk which gives rise to three types of male bird within the same species, according to researchers.

Scientists at the University of Edinburgh have pinpointed a supergene in the birds' DNA that is solely responsible for the different kinds of males found among ruffs.

Male ruffs can either have feathered collars - which they use in mating displays - or not, and either defend a territory or sneakily occupy other males' territories.

This gives rise to the three types - collared, territorial "independents"; collared, non-territorial males, and non-collared, non-territorial birds.

Scientists said they used new technologies to produce the complete gene sequence of the ruff genome - a catalogue of all its DNA - and to identify which parts of the DNA were responsible for the differences in mating plumage and behaviour.

The team found that for the non-territorial birds, some of the DNA of one of the birds' chromosomes was inverted compared to the independents', and that additional variation within this inverted DNA gave rise to the extra types.

The inversion affects genes that influence plumage colour, and biological pathways that affect sex hormone production.

The team worked with other scientists in Sheffield, Canada, the US, Netherlands, Russia and Austria on the research.

The study has been published in the journal Nature Genetics.