Germany declared a protectorate over South West Africa in 1884, during the opening phase of the Scramble for Africa. The territory was arid, and its value lay in grazing land. The Herero, cattle herders of the central plateau, and the Nama to their south steadily lost land and stock to German settlers, traders who foreclosed on debts, and a cattle plague in 1897. Plans for a railway and for confining Africans to reserves threatened what remained, and settlers' abuses went unpunished in colonial courts.
In January 1904 the Herero, led by Samuel Maharero, rose and killed more than a hundred German settlers and soldiers, generally sparing women, children, and missionaries. Berlin sent reinforcements under General Lothar von Trotha, a veteran of colonial wars in East Africa and of the Boxer Rebellion intervention. In August 1904 he attacked the Herero at the Waterberg with artillery and machine guns, and then drove the survivors, with their families and herds, into the waterless Omaheke desert, sealing the waterholes behind them. On 2 October he issued an order declaring that every Herero found within German territory, armed or not, would be shot. Tens of thousands died of thirst and starvation. The Nama, under the elderly Hendrik Witbooi, rebelled late in 1904 and fought a guerrilla war for several years.
After Berlin countermanded the shooting order, survivors of both peoples were confined in concentration camps, the most lethal on Shark Island, and used as forced labor; death rates were very high. Estimates of the Herero dead range from about 24,000 to 100,000, most often around 65,000, perhaps 80 percent of the people; roughly 10,000 Nama, about half their number, also perished. The survivors' land and cattle were confiscated, and they were compelled to carry passes and work for settlers. Skulls of victims were shipped to Germany for the studies of Scientific Racism.
Historians debate how directly these events foreshadowed the The Holocaust, but the vocabulary of racial struggle, the extermination order, and the camps make the comparison unavoidable. The case fits the definition of Genocide later framed by Raphael Lemkin. Germany formally acknowledged it as genocide in 2021.