Namibia's human history extends back at least 25,000 years, documented through archaeological evidence in sites across the country. The San people, whose ancestors created rock engravings at Twyfelfontein between 4,000 and 6,000 years ago, represent Namibia's oldest continuously inhabiting population. These engravings number over 2,500 individual images across 212 stone panels, depicting wildlife and abstract patterns using percussion and incision techniques on red sandstone. The San traditionally practiced nomadic hunter-gathering across territories that included both the Namib and Kalahari deserts, developing specialized knowledge systems for locating water sources in environments receiving less than 50 millimeters of annual rainfall in some zones. Genetic studies published in the early 2000s confirmed that San populations carry some of the oldest human DNA lineages, with certain groups showing genetic continuity dating back 35,000 years. The Ju|'hoan language, spoken by San communities in northeastern Namibia, contains between 48 and 122 phonemes depending on classification method, including five distinct click consonants represented orthographically by symbols including | and //.
The Nama people, part of the Khoekhoe ethnic group, migrated into present-day southern Namibia approximately 2,000 years ago, bringing pastoral traditions centered on fat-tailed sheep and cattle herding. The Nama language, called Khoekhoegowab, shares the click consonant system with San languages but belongs to a distinct language family. By the 17th century, Nama communities had established territorial control across the southern and central regions, organized into autonomous clans led by hereditary chiefs. The Oorlam, a subgroup descended from mixed Khoekhoe and Cape Colony populations, migrated northward into Namibia during the 1790s under leaders including Jonker Afrikaner, who established headquarters at Windhoek in 1840. Jonker Afrikaner controlled central Namibian trade routes until his death in 1861, maintaining military superiority through firearms acquired from Cape Colony traders. His son Christian Afrikaner continued leadership until conflicts with Herero groups intensified during the 1860s.
Bantu-speaking populations began migrating into northern Namibia from the Great Lakes region between the 14th and 16th centuries. The Ovambo, now comprising approximately 50 percent of Namibia's total population, established agricultural kingdoms in the northern flood plains where seasonal inundation from the Cuvelai-Etosha drainage system supported pearl millet cultivation. The Ovambo organized into eight distinct kingdoms including Ondonga, Uukwanyama, and Ukwambi, each governed by a hereditary king who controlled land allocation and tribute collection. Archaeological evidence from Ovambo settlements indicates continuous occupation since at least 1550 CE, with iron-smelting furnaces dated to the 16th century. The Herero and Himba peoples migrated into central and northwestern Namibia during the 17th century, bringing longhorn cattle herding traditions that became central to their social organization. Herero society structured itself around matrilineal clans called oruzo, each tracing descent through female lines to a common ancestress. Cattle ownership determined male social status, with herds numbering into the hundreds among wealthy families. The Himba, who separated from the main Herero population during the 19th century following conflicts and drought, maintained more conservative pastoral practices in the Kaokoland region, where they continue semi-nomadic cattle herding into the present.
European contact began with Portuguese navigator Diogo Cão, who reached Cape Cross on the Skeleton Coast in 1486, erecting a limestone cross that remained standing until its removal to Germany in 1893. The cross now at Cape Cross is a replica installed in 1974. Portuguese expeditions mapped the coastline but established no permanent settlements, deterred by the Namib Desert and absence of evident resources. The coast remained largely unvisited by Europeans until Dutch East India Company explorations in the 17th century, though these also resulted in no settlements. Walvis Bay attracted attention as a deep-water port, annexed by Britain in 1878 as part of Cape Colony expansion. The British administration governed Walvis Bay separately from the rest of Namibia until 1994, when it transferred to Namibian sovereignty four years after national independence.
Germany established colonial control over Namibia in 1884, following a treaty signed between German trader Adolf Lüderitz and Nama chief Joseph Fredericks that ceded 320 kilometers of coastal land for 200 rifles and £100 sterling. Chancellor Otto von Bismarck declared German South West Africa a protectorate on August 7, 1884, initiating three decades of colonial rule. German settlers established farms across the central plateau, appropriating land through treaties, purchases, and force. By 1903, approximately 4,682 German settlers lived in the territory. The colonial administration constructed a narrow-gauge railway system connecting Windhoek to the coast, with the first line from Swakopmund to Windhoek completed in 1902 covering 383 kilometers. German colonial architecture in towns including Swakopmund and Lüderitz introduced building styles uncommon in southern Africa, including half-timbered structures and Art Nouveau elements. Christuskirche in Windhoek, designed by architect Gottlieb Redecker and completed in 1910, combines Romanesque and Art Nouveau features using local sandstone and granite shipped from Germany for the foundation.
Resistance to German colonization intensified during the early 1900s. Samuel Maharero, paramount chief of the Herero, ordered armed resistance in January 1904 after German settlers seized additional grazing lands and colonial authorities imposed forced labor requirements. Herero forces initially killed approximately 123 German settlers and soldiers during the first months of the uprising. German commander Lothar von Trotha arrived in June 1904 with reinforcements, implementing a strategy of extermination codified in his October 1904 order that all Herero, including women and children, be driven from German territory or shot. German forces pursued retreating Herero into the Kalahari Desert, poisoning water sources and establishing guard posts along a 250-kilometer cordon to prevent return. The Battle of Waterberg on August 11, 1904, marked the decisive military defeat of Herero forces, after which German troops pursued survivors eastward into the Omaheke Desert. Between January 1904 and March 1907, the Herero population decreased from approximately 80,000 to 15,000. Survivors were confined in concentration camps where they performed forced labor, with documented death rates exceeding 45 percent annually in some camps. The Nama people under Hendrik Witbooi began armed resistance in October 1904, conducting guerrilla operations across southern Namibia until Witbooi's death in battle in October 1905 at age 80. Nama resistance continued under leaders including Jacob Morenga until 1908, by which time the Nama population had decreased from approximately 20,000 to 9,800.
The German government officially acknowledged the genocide in 2015, with Foreign Minister Frank-Walter Steinmeier stating that German actions constituted genocide by modern legal definitions. In 2021, Germany and Namibia concluded negotiations in which Germany recognized the events as genocide and committed to infrastructure and development funding totaling 1.1 billion euros over 30 years, though this agreement was not characterized as reparations. Herero and Nama representatives rejected the agreement, asserting they were excluded from negotiations and demanding direct reparations including land redistribution. The dispute remains unresolved as of 2024, with affected communities pursuing separate legal claims in international courts.
South African forces captured German South West Africa during World War I, with the German colonial administration surrendering on July 9, 1915, after military campaigns lasting nine months. The Treaty of Versailles transferred the territory to South Africa as a League of Nations mandate in 1920, granting South Africa administrative authority while prohibiting annexation. South Africa administered the territory under terms requiring promotion of African inhabitants' welfare and prohibition of military base establishment. The South African government instead extended its racial segregation policies into Namibia, issuing pass laws requiring Africans to carry identification documents and restricting movement between designated areas. The 1949 Native Commissioner Report documented forced labor systems in which African workers received no wages for work on white-owned farms, instead being compensated with rations. The South African government attempted to annex South West Africa as a fifth province in 1946, but the United Nations General Assembly rejected the proposal and terminated the mandate in 1966, declaring South Africa's continued occupation illegal. South Africa refused to withdraw, maintaining control through military force for an additional 24 years.