 Slavery occurs relatively rarely among hunter-gatherer populations because it develops under conditions of social stratification.Slavery operated in the first civilizations (such as Sumer in Mesopotamia, which dates back as far as 3500 BC).Slavery features in the Mesopotamian "Code of Hammurabi" (c. 1860 BCE), which refers to it as an established institution.