During prehistory, which lasted from around 2.5 million years ago until the invention of writing around 3500 BC, humans evolved from early hominids to hunter-gatherers who lived in tribes. The Palaeolithic period saw the first humans and use of tools like spears and axes made of stone. During the Neolithic period, around 9000 BC, humans transitioned to an agricultural lifestyle, settling in permanent villages and domesticating plants and animals. Various metal ages then followed, where cultures developed bronze and iron tools, enabling trade and the growth of cities.