By Helen Briggs
Science reporter, BBC News
The Eastern Sahara covers an area the size of Western Europe
Prehistoric humans roamed the world's largest desert for some 5,000 years, archaeologists have revealed.
The Eastern Sahara of Egypt, Sudan, Libya and Chad was home to nomadic people who followed rains that turned the desert into grassland.
When the landscape dried up about 7,000 years ago, there was a mass exodus to the Nile and other parts of Africa.
The close link between human settlement and climate has lessons for today, researchers report in Science.
"Even modern day conflicts such as Dafur are caused by environmental degradation as it has been in the past," Dr Stefan Kropelin of the University of Cologne, Germany, told the BBC News website.
"The basic struggle for food, water and pasture is still a big problem in the Sahara zone. This process started thousands of years ago and has a long tradition."
The Eastern Sahara, which covers more than 2 million sq km, an area the size of Western Europe, is now almost uninhabited by people or animals, providing a unique window into the past.
The settlers left their mark with art
Dr Kropelin and colleague Dr Rudolph Kuper pieced together the 10,000-year jigsaw of human migration and settlement; studying more than 100 archaeological sites over the course of 30 years.
In the largest study of its kind, they built up a detailed picture of human evolution in the world's largest desert. They found that far from the inhospitable climate of today, the area was once semi-humid.
Between about 14,000 and 13,000 years ago, the area was very dry. But a drastic switch in environmental conditions some 10,500 years ago brought rain and monsoon-like conditions.
Nomadic human settlers moved in from the south, taking up residence beside rivers and lakes. They were hunter-gatherers at first, living off plants and wild game.
Eventually they became more settled, domesticating cattle for the first time, and making intricate pottery.
Humid conditions prevailed until about 6,000 years ago, when the Sahara abruptly dried out. There was then a gradual exodus of people to the Nile Valley and other parts of the African continent.
"The Nile Valley was almost devoid of settlement until about exactly the time that the Egyptian Sahara was so dry people could not live there anymore," Dr Kropelin told the BBC News website.
"People preferred to live on savannah land. Only when this wasn't possible they migrated towards southern Sudan and the Nile.
"They brought all their know-how to the rest of the continent - the domestication of cattle was invented in the Sahara in the humid phase and was then slowly pushed over the rest of Africa.
"This Neolithic way of life, which still is a way of life in a sense; preservation of food for the dry season and many other such cultural elements, was introduced to central and southern Africa from the Sahara."
'Motor of evolution'
Dr Kuper said the distribution of people and languages, which is so politically important today, has its roots in the desiccation of the Sahara.
The switch in environmental conditions acted as a "motor of Africa's evolution," he said.
"It happened during these 5,000 years of the savannah that people changed from hunter-gathers to cattle keepers," he said.
"This important step in human history has been made for the first time in the African Sahara."