[2] The subfamily Caprinae, which includes goats, ibex and sheep, are considered to have diverged from the rest of Bovidae as early as the late Miocene,[3] with the group reaching its greatest diversity in the ice ages.
The tribe Caprini would subsequently develop from Caprids who arrived in the mountainous areas of Eurasia and split into goats and sheep in response to a further geographic separation.
[4] These earliest domesticated goats were used to produce meat and milk for Neolithic farmers,[5] along with providing many of the materials required to build residences and tools.
The earliest known Bovid was Eotragus, a genus of small antelope-like animals which were closely related to the modern nilgai and four-horned antelope[7] and lived over much of Eurasia.
[10] The success of the Bovidae is generally attributed to their ability to rapidly move across plains and to cope with the tough grass found in them due to their crowned teeth.
[3] Caprids were forced to find their niche away from the plains which were already heavily populated by Cervidae (Deer) and thus developed the characteristic agility required to survive in harsh environments.
The habitats occupied by different species of caprids would diverge noticeably and members of the group have since been found in areas ranging from deserts, tundra and alpine environments.
Selective pressure is generally considered to be the cause for the split between the Caprini and other Caprinae, with early members of the group moving into mountainous regions and developing particular traits in order adapt and to escape predators.
Those who remained in South America would subsequently form the Capra genus, which encompasses modern goats along with several species of Ibex, by the most recent ice age.
The need to adapt to higher altitudes pushed for the development of browsing behaviour due to the lack of low and easily accessible grass, a factor which likely contributed to the evolution of curiosity in goats and their ability to digest plants which would otherwise be poisonous.
The popular conception of goats as creatures who can eat any type of material, and who are difficult to contain with fencing, arises from the aforementioned traits which came as a result of the need to adapt to an unusual environment.
Consistent with what has been seen with other animals, the behaviour of goats has altered since domestication in response to accelerated evolution from thousands of years of interacting with humans[16] and selective breeding.