Archaeological excavations have demonstrated the presence of people in Morocco that were ancestral to Homo sapiens, as well as the presence of early human species. The fossilized bones of a 400,000-year-old early human ancestor were discovered in Salé in 1971. The bones of several very early Homo sapiens were excavated at Jebel Irhoud in 1991, these were dated using modern techniques in 2017 and found to be at least 300,000 years old, making them the oldest examples of Homo Sapiens discovered anywhere in the world. In 2007, small perforated seashell beads were discovered in Taforalt that are 82,000 years old, making them the earliest known evidence of personal adornment found anywhere in the world.
In Mesolithic times, between 20,000 and 5000 years ago, the geography of Morocco resembled a savanna more than the present arid landscape. While little is known of settlements in Morocco during that period, excavations elsewhere in the Maghreb region have suggested an abundance of game and forests that would have been hospitable to Mesolithic hunters and gatherers, such as those of the Capsian culture.
During the Neolithic period, which followed the Mesolithic, the savanna was occupied by hunters and herders. The culture of these Neolithic hunters and herders flourished until the region began to desiccate after 5000 BCE as a result of climatic changes. The coastal regions of present-day Morocco in the early Neolithic shared in the Cardium pottery culture that was common to the entire Mediterranean region. Archaeological excavations have suggested that the domestication of cattle and the cultivation of crops both occurred in the region during that period. In the Chalcolithic period, or the copper age, the Beaker culture reached the north coast of Morocco.