The genetic heritage of domesticated goats has been unlocked for the first time by a team of international scientists led by geneticists at Trinity College Dublin.

The study was carried out by sequencing the genomes of goats from the Paleolithic through to the Medieval period, whose bones were found in the Southwest Asia region.

In total bones from 80 ancient wild and domestic goats were examined, revealing many secrets about the development of the species.

The findings lay out a 10,000-year history of local farmer practices featuring genetic exchange both with the wild and among domesticated herds, and selection by early farmers.

The research, published in the journal Science, was led by Professor of Population Genetics at TCD, Professor Dan Bradley, as well as PhD researcher Kevin Daly and colleagues.

There are now more than one billion domestic goats in the world, which are used for meat, milk and their hides.

But that domestication process first began between 8,000 and 9,000 BC in the Fertile Crescent.

The team found that the domestication happened in a patchwork manner from wild populations in the area, rather in a single process.

"This process generated a distinctive genetic pool which evolved across time and still characterises the different goat populations of Asia, Europe and Africa today," said Pierpaolo Maisano Delser, Research Fellow and joint first author of the paper.

Using ancient samples, the group was able to analyse the genetic diversity of different goat populations back in time and reconstruct the history of early domesticates.

Charting the initial patterns of domestication, the findings demonstrate a surprising degree of genetic differentiation between goats across that area and surrounding regions.

Within the samples from the Neolithic period, the authors discovered domesticated goat subgroups that were genetically distinct from one another, and geographically focused with distributions located in the western, eastern and southern regions of the Fertile Crescent.

In later post-Neolithic samples, this pattern changes, the authors say, with less divergence.

"Just like humans, modern goat ancestry is a tangled web of different ancestral strands," said Prof Bradley.

The researchers also found that the process of moulding livestock into different types and breeds began early.

Kevin Daly said: "We found evidence that at least as far back as 8,000 years ago herders were interested in or valued the coat colour of their animals, based on selection signals at pigmentation genes.

"Furthermore, distinct but parallel patterns of this selection were observed in different early herds, suggesting this was a repeated phenomenon."

The geneticists also found evidence that early animals were selected for their fertility, size and because they may have been better able to tolerate new toxins.