Before human beings developed complex societies, they lived in primitive societies. The historical consensus is that complex societies emerged from primitive societies around 4000-2000 BCE in Egypt, Mesopotamia, the Indus Valley and China. According to traditional theories of how states emerged, the initial spark for the development of complex societies was an agricultural surplus. This economic specialization leads to divisions of labor. The economic transition from an agricultural economy to a division of labor is the most basic explanation of how societies go from primitive to complex.