The genocide of the Herero and Nama occurred during and after the suppression of uprisings by the Herero and Nama against the German colonial power in the colony of German South-West Africa during the years 1904 to 1908.

The uprising, fuelled by existential fears, began in January 1904 with an attack by the Ovaherero under Samuel Maharero on German installations and farms. Since the colony's Schutztruppe was initially unable to cope, the Reichsleitung then immediately dispatched reinforcements. With about 15,000 men under the command of Lieutenant General Lothar von Trotha, the Herero uprising was crushed by August 1904.

The majority of the Herero then fled to the almost waterless Omaheke desert. Trotha had the desert sealed off and chased away the refugees from the few watering places that existed there, so that thousands of Herero died of thirst together with their families and herds of cattle. Trotha had them informed in the so-called extermination order: "The Herero are no longer German subjects. [...] Within the German border, every Herero with or without a rifle, with or without cattle, will be shot; I will take in no more women and no more children, drive them back to their people or have them shot as well."

Trotha's warfare aimed at the complete annihilation of the Herero ("I believe that the nation as such must be destroyed"); his actions are considered by scholars to be the first genocide of the 20th century. Trotha was supported in this by the Chief of the General Staff Alfred Graf von Schlieffen ("The racial struggle that has broken out can only be concluded by destroying [...] the one party") and Kaiser Wilhelm II.

In the face of the incidents, the Nama rose up under their captains Hendrik Witbooi and Jakob Morenga in October 1904. Learning from the warfare against the Herero, the Nama avoided open battle against the German occupation and began a guerrilla war. Demoralized by the deaths of Witbooi, Morenga, and other leaders, nearly all Nama groups eventually submitted to German subjugation treaties, and the war was declared over on March 31, 1907. But this was not the end of the colonial policy of extermination. Following the fighting, the Herero and Nama were interned in concentration camps, where nearly every second inmate died. Of the Herero people, estimated at around 60,000 to 80,000 in 1904, only 20,000 were still alive in 1911. The genocide in German South-West Africa had thus cost the lives of 40,000 to 60,000 Herero and about 10,000 Nama.

The Herero commemorate the victims annually through Herero Day and the Witboois with Heroes' Day held near Gibeon. For decades they have been striving for official recognition by the United Nations as victims of genocide. The German government did not take a position on the assessment of the event for a long time, and as late as August 2012 dismissed any responsibility for genocide. On 10 July 2015, the German Foreign Office described the events as genocide for the first time.