Mesopotamia is the site of some of the earliest known civilizations in the world. Early settlement of the alluvial plain lasted from the Ubaid period (late 6th millennium BC) through the Uruk period (4th millennium BC) and the Dynastic periods (3rd millennium BC) until the rise of Babylon in the early 2nd millennium BC. The surplus of storable foodstuffs created by this economy allowed the population to settle in one place instead of migrating after crops and herds. It also allowed for a much greater population density, and in turn required an extensive labor force and division of labor. This organization led to the necessity of record keeping and the development of writing (c. 3500 BC).