Analysis of DNA from some of the world's first farmers shows that they had surprisingly diverse origins.
Researchers compared the genomes of ancient Neolithic skeletons from across the Near East, where farming began.
The results shed light on a debate over whether farming spread out from a single source in the region, or whether multiple farmer groups spread their technology across Eurasia.
The findings by an international team appear in the journal Science.
The switch from mobile hunting and gathering to the sedentary lifestyle of farming first occurred about 10,000 years ago in south-western Asia. After the last Ice Age, this new way of life spread rapidly across Eurasia, in one of the most important behavioural transitions in human history.
Analysis of DNA from ancient remains in Europe has established that farming spread via the mass migration of people, rather than adoption of new ideas by indigenous populations.
In the new study, researchers show that the DNA of early farmers who lived in the Zagros mountains of Iran was very different from that of the people who spread farming west from Turkey into Europe.
Despite the fact that both these groups inhabited the Fertile Crescent - a sickle-shaped zone stretching from the Nile Valley in the west to western Iran - they appear to have separated genetically between 46,000 and 77,000 years ago.
"Probably the biggest surprise news about this study is just how genetically different the eastern and western Fertile Crescent early farmers were," said co-author Mark Thomas, from University College London (UCL).
Co-author Dr Garrett Hellenthal, also from UCL, commented: "It had been widely assumed that these first farmers were from a single, genetically homogeneous population. However, we've found that there were deep genetic differences in these early farming populations, indicating very distinct ancestries."
The DNA of the Zagros mountains farmers most closely resembled that of living people from Afghanistan, Pakistan and Iran - and Iranian Zoroastrians in particular. Zoroastrians are the people who practise an ancient pre-Islamic religion of present-day Iran.
The present-day population whose genomes most closely resemble those of the western farmers is found not in the Middle East, but on the Italian island of Sardinia.
This reveals the scale of genetic change in the Fertile Crescent since the Neolithic. After the invention of agriculture, divergent groups of Middle Eastern farmers mixed thoroughly, and the region received genetic inputs from populations residing in surrounding areas.
Mark Thomas believes the findings dovetail with an idea put forward by the Cambridge University researcher Marta Mirazón Lahr known as the Holocene Filter. This is the process by which hunting groups which were highly distinct from each other (often over relatively short geographic distances) were reshaped by extinction and migration in the last 10,000 years.
As a consequence human diversity was lost due to the differential expansion of a few populations.
Discussing what the study said about the origins of farming, Dr Thomas told BBC News: "From the archaeology we know that different species were domesticated in different locations around the Fertile Crescent with no particular centre.
"So either we've got different species being domesticated in different locations and then spreading in something like a free trade zone. Or we've got independent domestications in different regions. But that doesn't work for some species - cattle, for example.
"Cattle were domesticated from a very small number of animals - about 100 or so. It's difficult to marry that with the idea that they were domesticated on multiple occasions."
Prof Thomas said it could be seen as a "federal" origin of farming: "Different and genetically distinct populations were all engaged in this same general project, albeit exchanging ideas with each or other or sometimes coming up with the same idea independently."
Interestingly, what the early farmer populations do share is ancestry from an enigmatic group of humans known as Basal Eurasians. After humans left Africa, this population split away from other non-Africans and somehow interbred less with Neanderthals. But it's unclear where exactly these ancient people resided until they mixed with the ancestors of the farmers.
"Maybe they were hiding somewhere in North Africa, maybe they were hiding in the Middle East - somewhere with fewer Neanderthals. We just don't know," said Prof Thomas.
Basal Eurasians are often referred to as a "ghost population", as they are only inferred from genetic data through their ancestral contribution to other human groups like the first Middle Eastern farmers - and by extension modern human groups from India to western Europe.