Namibian history in a nutshell:

    
Sub-Saharan Africa is regarded as the cradle of humanity, and it is likely that early humans will have been present in prehistory in what today is Namibia. Known to have been around since ancient times are the Nama and San (Bushmen), both speakers of Khoisan languages (with click sounds, as in Xhosa), later a third Khoisan group, the Oorlam migrated in from the south under the pressure of Dutch settlers pushing north in what is today South Africa. Before that, from the 16th century the north was settled by the Herero, a Bantu group (also linguistically) who had come in from the east and north and occupied large parts of northern Namibia, mainly as cattle herders. Other groups later also added to the ethnic mix. There were conflicts between some of these groups at times, but by the second half of the 19th century peace had been more or less achieved.
  
European influence in Namibia came late. Portuguese explorers had landed at a few points along the coast in the 15th century, but found the coastal deserts so inhospitable that they didn’t pay any further attention to this part of Africa (but created the colony of Angola to the north). The interior wasn’t explored at all by any Europeans until the mid-18th century. The only place deemed of any worth by the Europeans, especially whalers, was the natural harbour of Walvis Bay (literally ‘whale fish bay’), the only such harbour along the entire Namibian coast. And so the Dutch colonists of the Cape decided to take possession of Walvis Bay, later taken over by the British (like South Africa too). It remained in South African hands even after Namibian independence (see below) until 1994.
  
Other than that outpost, Europeans largely kept out. The only Europeans penetrating inland were missionaries and traders in the 18th/19th centuries. But theirs remained isolated (though influential) and small outposts.
  
However, in 1883 a German merchant of the name Alfred Lüderitz bought up land at a bay south of Walvis Bay which he in all humbleness named Lüderitzbucht (‘Lüderitz Bay’). Today the town at this place is still simply known as Lüderitz. Up to this point Germany hadn’t shown much interest in colonialism, but that changed in 1884, when Reich Chancellor Otto von Bismarck claimed Togo and Cameroon as German colonies and also sent a warship to Lüderitz. Within a few years Lüderitz was bought out by the newly formed German Colonial Company for South West Africa. And so the German colony of “Deutsch-Südwestafrika” began. This was consolidated at the Berlin Conference of 1884-85, which sought to bring order to the European “Scramble for Africa”. And so the big colonial powers parcelled out the entire continent, without any consultation with or concern for any actual Africans. In the process the borders of Namibia were drawn too.
   
At first, the new colony was rather only nominal. It wasn’t until 1889 that the first small contingent of the “Schutztruppe” (‘protection force’) arrived. In 1890 a fort was established at Windhoek (still in existence under the name of “Alte Feste”, ‘old fortress’). More German settlers came in too. From early on, the new colonists exploited local conflicts between different ethnic groups by coercing them into ‘protection treaties’ with the German Schutztruppe.
  
Over the course of the 1890s and early 1900s, more and more land was bought up (and sometimes just taken) from the natives by German traders and farmers. It soon became apparent that the German whites regarded the local black population as subhuman and so they treated them accordingly. At the same time Germany also embarked on improvements to the infrastructure and construction of buildings in the colonial style that can still be seen in several places (especially Lüderitz and Swakopmund).
  
The Herero in particular grew increasingly unhappy about the loss of land and the way they were treated. And so the Namibian War of Resistance 1904-1907 began. Initially the Herero had some successes, e.g. taking some German outposts and farms and cutting off the railway from Windhoek to the coast. But then the Germans brought in a new commanding general, Lothar von Trotha, who was already known for his brutality executed in other German colonies. Von Trotha decided to quell the rebellion in the most heavy-handed way: by annihilation and/or expulsion of all Herero.
  
He fielded artillery and a 1500-strong contingent of soldiers and met the Herero at their stronghold at Waterberg (named after its permanent waterholes, which were crucial for the Herero). Apparently the Herero were expecting negotiations, but instead they were massacred. Some 3000-5000 Hereros were killed, the rest fled into the desert. The Germans killed anybody returning from there, or who they found otherwise, on the spot, including women and children. Most Herero died of dehydration in the desert. Only about a thousand made it to the neighbouring British colony, in what is today Botswana, where they found asylum.
   
This attempted annihilation of the Herero is generally regarded as the 20th century’s first genocide. Whether it was perpetrated on von Trotha’s own initiative or whether he had orders from the Kaiser back in Germany remains unclear and no documents that could clarify this survived WWII. The fact that there was no punishment for von Trotha in Germany when the atrocities became known may suggest that he acted at least with his superiors’ consent. In fact he was given a promotion for his service in German South West Africa on his return.
  
After the Battle of Waterberg, the Nama also rebelled against the colonists, but more in the form of guerrilla warfare. By that time, von Trotha’s annihilation policy had been retracted by the Kaiser and high command (and von Trotha was removed from the command in the colony), not just because the genocide had damaged Germany’s reputation, but also because the natives were deemed useful as a source of cheap (or forced) labour.
  
By late 1904, any captured Herero or Nama, instead of being murdered outright, were instead put in concentration camps – a concept the Germans had copied from the British in South Africa, where it was first implemented during the Boer War (cf. St Helena). The camp inmates had to do forced labour and lived in appalling conditions. One such camp was at Shark Island at Lüderitz. Over 50% of its inmates died of malnutrition, exhaustion and disease (some estimates put the figure as high as 75%). Moreover, some victims were also subjected to medical experiments, and specimens of skulls of Namibian concentration camp victims were sent to Germany for “research” (into “eugenics”). It was only in 2011 that a first batch of these skulls, from a collection held at the Charité Hospital in Berlin, was returned to Namibia for burial.
  
Given the treatment of victims at the time it can be argued that the genocide in Namibia continued through these concentration camps albeit in a different form. Hence it is frequently called the “genocide of the Herero and Nama people”, although the specific initial annihilation strategy by von Trotha was directed only against the Herero. The Nama eventually ended their uprising in 1907 and so the war of resistance was over.
  
Meanwhile, many more German settlers arrived and infrastructure was vastly expanded. When in 1908 diamond deposits were discovered near Lüderitz (see Kolmanskop), this triggered another wave of prospectors coming to Namibia from Germany in the hope of reaping the riches of this diamond rush. German South West Africa was thus booming and lots of grand colonial architecture from this time is testimony to this boom.
  
But then came the declaration of World War One. South Africa, then still a British colony, was asked to attack the Germans in the neighbouring territory, and by 1915 the German troops were overwhelmed and surrendered. Thus ended the German colony in Namibia. And through the post-WW1 Treaty of Versailles, Germany lost all its colonies for good. The South West African territory was assigned to the Union of South Africa as a “trust territory” by the League of Nations.
  
So for Namibia this was by no means the end of colonialism. Now it was South Africa that took over, and together with the remaining German settlers they ruthlessly exploited the native population further and a segregation set in that was a precursor to the full-on Apartheid that was introduced in Namibia after the same happened in South Africa. After WWII, the meanwhile independent state of South Africa formally annexed its northern neighbour in 1947 against the wishes of the UN, the League of Nations’ successor. In the 1960s the UN tried to ensure an independent Namibia – in fact it was only then that the country was given this name, but South Africa continued to ignore any such calls for independence and carried on with its racist and exploitative policies.
  
It was then that the native people of Namibia took to arms to fight for their freedom themselves. This struggle for independence was led by the South West African People’s Organisation (SWAPO) with the first armed clashes occurring from 1966.
  
The UN meanwhile tried to implement sanctions against South Africa after its continued occupation of Namibia was formally declared illegal, but the efforts were routinely vetoed by those countries in the West (guess the usual suspects) who had vested interests in South Africa and Namibia, especially in the extraction industry sector (in particular diamonds).
  
When Namibia’s northern neighbour Angola achieved independence in 1975 after its own long struggle for freedom, this had an impact on Namibia too. Now SWAPO had a sympathetic ally north of the border in the Marxist-Leninist new government under the MPLA (see under Angola) which also enjoyed the support of the Soviet Union and Cuba. And so SWAPO set up bases inside that country from where to launch their guerrilla attacks in Namibia. Subsequently South Africa increased its military action against SWAPO, even attacking them inside Angola. Thus it indirectly got involved in the Angolan Civil War that dragged on and on, and it also supported the MPLA’s main rival organization UNITA (again, see under Angola).
  
The UN tried to broker a solution to the quagmire, but South Africa insisted on the condition of a withdrawal of Cuban troops and guarantees for its white-owned investments in Namibia, which SWAPO in turn refused to accept. It wasn’t until 1988 that negotiations led to an agreement under which a phased withdrawal of Cuban forces from Angola in parallel to a phased withdrawal of South African troops from Namibia should be followed by the original UN plan and UN-supervised free elections. 7000 UN personnel came to Namibia to oversee the process and the elections and in late 1989 the country voted in its first National Assembly. SWAPO won, but fell short of a two-thirds majority. The Assembly’s first task was to draft a constitution. In 1994, South Africa also returned Walvis Bay to Namibia.
  
Since independence, Namibia has proved a peaceful and democratic country honouring its constitution, and a slow and still ongoing process of redistribution of land was begun to counter the gross inequality institutionalized under South African (and before that German) rule. SWAPO won all subsequent elections, sometimes with overwhelming majorities, but hasn’t abused its power in the way we’ve so often seen in other African countries. After the 2014 election, a Herero became president for the first time.
  
In the new Millennium, successive governments of Germany have gradually accepted guilt of the genocide of 1904-07, eventually apologized formally, and promised financial aid (though stopping short of calling these ‘reparations’) and also started returning artefacts taken from Namibia during the German colonial period.