Twelve thousand years ago everybody lived as hunters and gatherers. But by 5,000 years ago most people lived as farmers.
This brief period marked the biggest shift ever in human history with unparalleled changes in diet, culture and technology, as well as social, economic and political organisation, and even the patterns of disease people suffered.
While there were upsides and downsides to the invention of agriculture, was it the greatest blunder in human history? Three decades ago Jarred Diamond thought so, but was he right?
Agriculture developed worldwide within a single and narrow window of time: between about 12,000 and 5,000 years ago. But as it happens it wasn't invented just once but actually originated at least seven times, and perhaps 11 times, and quite independently, as far as we know.
Farming was invented in places like the Fertile Crescent of the Middle East, the Yangzi and Yellow River Basins of China, the New Guinea highlands, in the Eastern USA, Central Mexico and South America, and in sub-Saharan Africa.
And while its impacts were tremendous for people living in places like the Middle East or China, its impacts would have been very different for the early farmers of New Guinea.
The reasons why people took up farming in the first place remain elusive, but dramatic changes in the planet's climate during the last Ice Age — from around 20,000 years ago until 11,600 years ago — seem to have played a major role in its beginnings.
The invention of agriculture thousands of years ago led to the domestication of today's major food crops like wheat, rice, barley, millet and maize, legumes like lentils and beans, sweet potato and taro, and animals like sheep, cattle, goats, pigs, alpacas and chickens.
It also dramatically increased the human carrying capacity of the planet. But in the process the environment was dramatically transformed. What started as modest clearings gave way to fields, with forests felled and vast tracts of land turned over to growing crops and raising animals.
In most places the health of early farmers was much poorer than their hunter-gatherer ancestors because of the narrower range of foods they consumed alongside of widespread dietary deficiencies.
At archaeological sites like Abu Hereyra in Syria, for example, the changes in diet accompanying the move away from hunting and gathering are clearly recorded. The diet of Abu Hereyra's occupants dropped from more than 150 wild plants consumed as hunter-gatherers to just a handful of crops as farmers.
In the Americas, where maize was domesticated and heavily relied upon as a staple crop, iron absorption was consequently low and dramatically increased the incidence of anaemia. While a rice based diet, the main staple of early farmers in southern China, was deficient in protein and inhibited vitamin A absorption.
There was a sudden increase in the number of human settlements signalling a marked shift in population. While maternal and infant mortality increased, female fertility rose with farming, the fuel in the engine of population growth.
The planet had supported roughly 8 million people when we were only hunter-gatherers. But the population exploded with the invention of agriculture climbing to 100 million people by 5,000 years ago, and reaching 7 billion people today.
People began to build settlements covering more than ten hectares - the size of ten rugby fields - which were permanently occupied. Early towns housed up to ten thousand people within rectangular stone houses with doors on their roofs at archaeological sites like Çatalhöyük in Turkey.
By way of comparison, traditional hunting and gathering communities were small, perhaps up to 50 or 60 people.
Crowded conditions in these new settlements, human waste, animal handling and pest species attracted to them led to increased illness and the rapid spread of infectious disease.
Today, around 75% of infectious diseases suffered by humans are zoonoses, ones obtained from or more often shared with domestic animals. Some common examples include influenza, the common cold, various parasites like tapeworms and highly infectious diseases that decimated millions of people in the past such as bubonic plague, tuberculosis, typhoid and measles.
In response, natural selection dramatically sculpted the genome of these early farmers. The genes for immunity are over-represented in terms of the evidence for natural selection and most of the changes can be timed to the adoption of farming. And geneticists suggest that 85% of the disease-causing gene variants among contemporary populations arose alongside the rise and spread of agriculture.
In the past, humans could only tolerate lactose during childhood, but with the domestication of dairy cows natural selection provided northern European farmers and pastoralist populations in Africa and West Asia the lactase gene. It's almost completely absent elsewhere in the world and it allowed adults to tolerate lactose for the first time.
Starch consumption is also feature of agricultural societies and some hunter-gatherers living in arid environments. The amylase genes, which increase people's ability to digest starch in their diet, were also subject to strong natural selection and increased dramatically in number with the advent of farming.
Another surprising change seen in the skeletons of early farmers is a smaller skull especially the bones of the face. Palaeolithic hunter-gatherers had larger skulls due to their more mobile and active lifestyle including a diet which required much more chewing.
Smaller faces affected oral health because human teeth didn't reduce proportionately to the smaller jaw, so dental crowding ensued. This led to increased dental disease along with extra cavities from a starchy diet.
Living in densely populated villages and towns created for the first time in human history private living spaces where people no longer shared their food or possessions with their community.
These changes dramatically shaped people's attitudes to material goods and wealth. Prestige items became highly sought after as hallmarks of power. And with larger populations came growing social and economic complexity and inequality and, naturally, increasing warfare.
Inequalities of wealth and status cemented the rise of hierarchical societies — first chiefdoms then hereditary lineages which ruled over the rapidly growing human settlements.
Eventually they expanded to form large cities, and then empires, with vast areas of land taken by force with armies under the control of emperors or kings and queens.
This inherited power was the foundation of the 'great' civilisations that developed across the ancient world and into the modern era with its colonial legacies that are still very much with us today.
No doubt the bad well and truly outweighs all the good that came from the invention of farming all those millenia ago. Jarred Diamond was right, the invention of agriculture was without doubt the biggest blunder in human history. But we're stuck with it, and with so many mouths to feed today we have to make it work better than ever. For the future of humankind and the planet.