Humanity's written history was preceded by its prehistory, beginning with the Palaeolithic Era ("Early Stone Age"), followed by the Neolithic Era ("New Stone Age"). The Neolithic saw the Agricultural Revolution begin, between 8000 and 5000 BCE, in the Near East's Fertile Crescent. The Agricultural Revolution marked a fundamental change in history, with humans beginning the systematic husbandry of plants and animals. As agriculture advanced, most humans transitioned from a nomadic to a settled lifestyle as farmers in permanent settlements. The relative security and increased productivity provided by farming allowed communities to expand into increasingly larger units, fostered by advances in transportation.
Whether in prehistoric or historic times, people always needed to be near reliable sources of potable water. Cities developed on river banks as early as 3000 BCE, when some of the first well-developed settlements arose in Mesopotamia, on the banks of Egypt's Nile River, in the Indus River valley, and along China's rivers. As farming developed, grain agriculture became more sophisticated and prompted a division of labour to store food between growing seasons. Labour divisions led to the rise of a leisured upper class and the development of cities, which provided the foundation for civilization. The growing complexity of human societies necessitated systems of accounting and writing.
With civilizations flourishing, ancient history ("Antiquity," including the Classical Age, up to about 500 CE) saw the rise and fall of empires. Post-classical history (the "Middle Ages," c. 500–1500 CE ) witnessed the rise of Christianity, the Islamic Golden Age (c. 750 CE – c. 1258 CE), and the early Italian Renaissance (from around 1300 CE). The Early Modern Period, sometimes referred to as the "European Age", from about 1500 to 1800, included the Age of Enlightenment and the Age of Discovery. The mid-15th-century invention of modern printing, employing movable type, revolutionized communication and facilitated ever wider dissemination of information, helping end the Middle Ages and ushering in the Scientific Revolution. By the 18th century, the accumulation of knowledge and technology had reached a critical mass that brought about the Industrial Revolution and began the Late Modern Period, which starts around 1800 and includes the current day.
This scheme of historical periodization (dividing history into Antiquity, Post-Classical, Early Modern, and Late Modern periods) was developed for, and applies best to, the history of the Old World, particularly Europe and the Mediterranean. Outside this region, including ancient China and ancient India, historical timelines unfolded differently. However, by the 18th century, due to extensive world trade and colonization, the histories of most civilizations had become substantially intertwined. In the last quarter-millennium, the rates of growth of population, knowledge, technology, communications, commerce, weapons destructiveness, and environmental degradation have greatly accelerated, creating opportunities and perils that now confront the planet's human communities.
Genetic measurements indicate that the ape lineage which would lead to Homo sapiens diverged from the lineage that would lead to chimpanzees and bonobos, the closest living relatives of modern humans, around 4.6 to 6.2 million years ago. Anatomically modern humans arose in Africa about 200,000 years ago, and reached behavioural modernity about 50,000 years ago.
Modern humans spread rapidly from Africa into the frost-free zones of Europe and Asia around 60,000 years ago. The rapid expansion of humankind to North America and Oceania took place at the climax of the most recent ice age, when temperate regions of today were extremely inhospitable. Yet, humans had colonized nearly all the ice-free parts of the globe by the end of the Ice Age, some 12,000 years ago. Other hominids such as Homo erectus had been using simple wood and stone tools for millennia, but as time progressed, tools became far more refined and complex.
Perhaps as early as 1.8 million years ago, but certainly by 500,000 years ago, humans began using fire for heat and cooking. They also developed language in the Paleolithic period and a conceptual repertoire that included systematic burial of the dead and adornment of the living. Early artistic expression can be found in the form of cave paintings and sculptures made from ivory, stone, and bone, showing a spirituality generally interpreted as animism, or even shamanism. During this period, all humans lived as hunter-gatherers, and were generally nomadic. Archaeological and genetic data suggest that the source populations of Paleolithic hunter-gatherers survived in sparsely wooded areas and dispersed through areas of high primary productivity while avoiding dense forest cover.