From The Fate of Africa: A History of Fifty Years of Independence, by Martin Meredith (PublicAffairs, 2005), pp. 3-4:
Scores of African rulers who resisted colonial rule died in battle or were executed or sent into exile after defeat. Samori of the Mandingo was captured and died in exile two years later; the Asantehene, King Agyeman Prempeh, was deposed and exiled for nearly thirty years; Lobengula of the Ndebele died in flight; Behazin of Dahomey and Cetshwayo of the Zulu were banished from their homelands.
In the concluding act of the partition of Africa, Britain, at the height of its imperial power, set out to take over two independent Boer republics, the Transvaal and the Orange Free State, and incorporate them into the British Empire, assuming that a war of conquest would take at most a matter of months. It turned into a gruelling campaign lasting three years, required nearly half a million imperial troops to finish it, and left a legacy of bitterness and hatred among Afrikaners that endured for generations. Faced with guerrilla warfare for which they were unprepared, British military commanders resorted to scorched-earth tactics, destroying thousands of farmsteads, razing villages to the ground and slaughtering livestock on a massive scale, reducing the Boers to an impoverished people. Women and children were rounded up and placed in what the British called concentration camps, where conditions were so appalling that some 26,000 died there from disease and malnutrition, most of them under the age of sixteen. All this became part of a Boer heritage passed in anger from one generation to the next, spawning a virulent Afrikaner nationalism that eventually took hold of South Africa.
Small-scale revolts against colonial rule continued for many years. The Baoulé of Côte d’Ivoire fought the French village by village until 1911; the Igbo of Nigeria were not fully defeated until 1919; the Jola of Senegal not until the 1920s; the Dinka of southern Sudan not until 1927. In the desert wastelands of Somaliland a fiery Muslim sheikh, Muhammad ’Abdille Hassan, dubbed by his adversaries the ‘Mad Mullah’, led Dervish warriors in a holy war against the British for twenty years until his death in 1920. Bedouin resistance against Italian rule in Libya ended only in 1931 after nine years of guerrilla warfare. By the 1930s, however, the colonial states of Africa were firmly entrenched; they had, moreover, acquired a legitimacy in the eyes of their inhabitants.