The colonial history of Africa spans from colonial period until the postcolonial period in the history of Africa.
Southern Africa
By the 1850s, British and German missionaries and traders had penetrated present-day Namibia. The Herero and Nama peoples competed for guns and ammunition, providing cattle, ivory, and ostrich feathers. The Germans were more firmly established than the British in the region. By 1884, the Germans declared the coastal region from the Orange River to the Kunene River a German protectorate, part of German South West Africa. They pursued an aggressive policy of land expansion for white settlements. They exploited rivalry between the Nama and Herero.
The Herero entered into an alliance with the Germans, thinking they could get an upper hand on the Nama. The Germans set up a garrison at the Herero capital and started allocating Herero land for white settlements, including the best grazing land in the central plateau, and made tax and labor demands. The Herero and Ovambanderu rebelled, but the rebellion was crushed and leaders were executed. Between 1896 and 1897, rinderpest impaired the Herero and Nama economy and slowed white expansion. The Germans continued the policy of making Namibia a white settlement by seizing land and cattle, and even trying to export Herero labor to South Africa.
In 1904, the Herero rebelled again. German General Lothar von Trotha implemented an extermination policy at the Battle of Waterberg, which drove the Herero west of the Kalahari Desert. At the end of 1905, only 16,000 Herero were alive, out of a previous population of 80,000. Nama resistance was crushed in 1907. All Nama and Herero cattle and land were confiscated from the very diminished population, with remaining Nama and Herero assuming a subordinate position. Labor had to be imported from among the Ovambo.
Nguniland
A moment of great disorder in southern Africa was the Mfecane, "the crushing." It was started by the northern Nguni kingdoms of Mthethwa, Ndwandwe, and Swaziland over scarce resource and famine. When Dingiswayo of Mthethwa died, Shaka of the Zulu people took over. He established the Zulu Kingdom, asserting authority over the Ndwandwe and pushing the Swazi north. The scattering Ndwandwe and Swazi caused the Mfecane to spread. During the 1820s, Shaka expanded the empire all along the Drakensberg foothills, with tribute being paid as far south as the Tugela and Umzimkulu rivers. He replaced the chiefs of conquered polities with indunas, responsible to him. He introduced a centralized, dedicated, and disciplined military force not seen in the region, with a new weapon in the short stabbing-spear.
In 1828, Shaka was assassinated by his half brother Dingane, who lacked the military genius and leadership skills of Shaka. Voortrekkers tried to occupy Zulu land in 1838. In the early months they were defeated, but the survivors regrouped at the Ncome River and soundly defeated the Zulu. However, the Voortrekkers dared not settle Zulu land. Dingane was killed in 1840 during a civil war. His brother Mpande took over and strengthened Zulu territories to the north. In 1879 the Zulu Kingdom was invaded by Britain in a quest to control all of South Africa. The Zulu Kingdom was victorious at the Battle of Isandlwana but was defeated at the Battle of Ulundi.
One of the major states to emerge from the Mfecane was the Sotho Kingdom founded at Thaba Bosiu by Moshoeshoe I around 1821 to 1822. It was a confederation of different polities that accepted the absolute authority of Moshoeshoe. During the 1830s, the kingdom invited missionaries as a strategic means of acquiring guns and horses from the Cape. The Orange Free State slowly diminished the kingdom but never completely defeated it. In 1868, Moshoeshoe asked that the Sotho Kingdom be annexed by Britain, to save the remnant. It became the British protectorate of Basutoland.
Sotho-Tswana
The arrival of the ancestors of the Tswana-speakers who came to control the region (from the Vaal River to Botswana) has yet to be dated precisely although AD 600 seems to be a consensus estimate. This massive cattle-raising complex prospered until 1300 AD or so. All these various peoples were connected to trade routes that ran via the Limpopo River to the Indian Ocean, and trade goods from Asia such as beads made their way to Botswana most likely in exchange for ivory, gold, and rhinoceros horn. The first written records relating to modern-day Botswana appear in 1824. What these records show is that the Bangwaketse had become the predominant power in the region. Under the rule of Makaba II, the Bangwaketse kept vast herds of cattle in well-protected desert areas, and used their military prowess to raid their neighbours. Other chiefdoms in the area, by this time, had capitals of 10,000 or so and were fairly prosperous. This equilibrium came to end during the Mfecane period, 1823–1843, when a succession of invading peoples from South Africa entered the country. Although the Bangwaketse were able to defeat the invading Bakololo in 1826, over time all the major chiefdoms in Botswana were attacked, weakened, and impoverished. The Bakololo and Amandebele raided repeatedly, and took large numbers of cattle, women, and children from the Batswana—most of whom were driven into the desert or sanctuary areas such as hilltops and caves. Only after 1843, when the Amandebele moved into western Zimbabwe, did this threat subside.During the 1840s and 1850s trade with Cape Colony-based merchants opened up and enabled the Batswana chiefdoms to rebuild. The Bakwena, Bangwaketse, Bangwato and Batawana cooperated to control the lucrative ivory trade, and then used the proceeds to import horses and guns, which in turn enabled them to establish control over what is now Botswana. This process was largely complete by 1880, and thus the Bushmen, the Bakalanga, the Bakgalagadi, the Batswapong and other current minorities were subjugated by the Batswana. Following the Great Trek, Afrikaners from the Cape Colony established themselves on the borders of Botswana in the Transvaal. In 1852 a coalition of Tswana chiefdoms led by Sechele I resisted Afrikaner incursions, and after about eight years of intermittent tensions and hostilities, eventually came to a peace agreement in Potchefstroom in 1860. From that point on, the modern-day border between South Africa and Botswana was agreed on, and the Afrikaners and Batswana traded and worked together peacefully. In the 1820s, refugees from the Zulu expansion under Shaka came into contact with the Basotho people residing on the highveld. In 1823, those pressures caused one group of Basotho, the Kololo, to migrate north, past the Okavango Swamp and across the Zambezi into Barotseland, now part of Zambia. In 1845, the Kololo conquered Barotseland.
At about the same time, the Boers began to encroach upon Basotho territory.. After the Cape Colony had been ceded to Britain at the conclusion of the Napoleonic Wars, the voortrekkers ("pioneers") were farmers who opted to leave the former Dutch colony and moved inland where they eventually established independent polities..
At the time of these developments, Moshoeshoe I gained control of the Basotho kingdoms of the southern Highveld. Universally praised as a skilled diplomat and strategist, he was able to wield the disparate refugee groups escaping the Difaqane into a cohesive nation. His inspired leadership helped his small nation to survive the dangers and pitfalls (the Zulu hegemony, the inward expansion of the voortrekkers and the designs of imperial Britain) that destroyed other indigenous South African kingdoms during the 19th century.
In 1822, Moshoeshoe established his capital at Butha-Buthe, an easily defensible mountain in the northern Drakensberg mountains, laying the foundations of the eventual Kingdom of Lesotho. His capital was later moved to Thaba Bosiu.
To deal with the encroaching voortrekker groups, Moshoeshoe encouraged French missionary activity in his kingdom. Missionaries sent by the Paris Evangelical Missionary Society provided the King with foreign affairs counsel and helped to facilitate the purchase of modern weapons.
Aside from acting as state ministers, missionaries (primarily Casalis and Arbousset) played a vital role in delineating Sesotho orthography and printing Sesotho language materials between 1837 and 1855.Casalis, E. (1992). The Basutos : or, twenty-three years in South Africa. Morija: Morija Museum & Archives. The first Sesotho translation of the Bible appeared in 1878.
In 1868, after losing the western lowlands to the Boers during the Free State–Basotho Wars; Moshoeshoe successfully appealed to Queen Victoria to proclaim Lesotho (then known as Basutoland) a protectorate of Britain and the British administration was placed in Maseru, the site of Lesotho's current capital. Local chieftains retained power over internal affairs while Britain was responsible for foreign affairs and the defence of the protectorate.. In 1869, the British sponsored a process by which the borders of Basutoland were finally demarcated. While many clans had territory within Basutoland, large numbers of Sesotho speakers resided in areas allocated to the Orange Free State, the sovereign voortrekker republic that bordered the Basotho kingdom.
Voortrekkers
By the 19th century, most Khoikhoi territory was under Boer control. The Khoikhoi had lost economic and political independence and had been absorbed into Boer society. The Boers spoke Afrikaans, a language or dialect derived from Dutch, and no longer called themselves Boers but Afrikaners. Some Khoikhoi were used as commandos in raids against other Khoikhoi and later Xhosa. A mixed Khoi, slave, and European population called the Cape Coloureds, who were outcasts within colonial society, also arose. Khoikhoi who lived far on the frontier included the Kora, Oorlams, and Griqua. In 1795, the British took over the cape colony from the Dutch.
In the 1830s, Boers embarked on a journey of expansion, east of the Great Fish River into the Zuurveld. They were referred to as Voortrekkers. They founded republics of the Transvaal and Orange Free State, mostly in areas of sparse population that had been diminished by the Mfecane/Difaqane. Unlike the Khoisan, the Bantu states were not conquered by the Afrikaners, because of population density and greater unity. Additionally, they began to arm themselves with guns acquired through trade at the cape. In some cases, as in the Xhosa/Boer Wars, Boers were removed from Xhosa lands. It required a dedicated imperial military force to subdue the Bantu-speaking states. In 1901, the Boer republics were defeated by Britain in the Second Boer War. The defeat however consummated many Afrikaners' ambition: South Africa would be under white rule. The British placed all power—legislative, executive, administrative—in English and Afrikaner hands.
European trade, exploration and conquest
Between 1878 and 1898, European states partitioned and conquered most of Africa. For 400 years, European nations had mainly limited their involvement to trading stations on the African coast. Few dared venture inland from the coast; those that did, like the Portuguese, often met defeats and had to retreat to the coast. Several technological innovations helped to overcome this 400-year pattern. One was the development of repeating rifles, which were easier and quicker to load than muskets. Artillery was being used increasingly. In 1885, Hiram S. Maxim developed the maxim gun, the model of the modern-day machine gun. European states kept these weapons largely among themselves by refusing to sell these weapons to African leaders.