Roughly 5,300 years ago, a group of ancient sheep herders in East Africa began an extraordinary effort to care for their dead.

It was a time of great upheaval in their homeland. Global climate changes had weakened the African monsoon system, causing a significant drop in rainfall. Pastoralism spread south from the Sahara . What is now known as Lake Turkana in northern Kenya shrank by half over the succeeding centuries.

These early herders dug through about 1,000 square feet of beach sands down to bedrock and gouged out burial pits. They interred their dead there: the bodies of men, women and children of all ages, many with personal items and ornamentation.

When the crevices they had dug into the bedrock filled up, the herders piled bodies on top of the pits, carefully placing large rocks over the heads and torso of each corpse. They did this for about 700 years, burying at least 580 people and perhaps 1,000 in all, according to a study published on Monday in the Proceedings of the National Academy of Sciences.