The decolonization of Africa was a long and complex process, marked by decades of resistance against colonialism from the continent's people. Notable examples include the Maji-Maji uprising in present-day Tanzania against German rule and the Mau Mau uprising in Kenya against British colonizers. The movement was also shaped by the ideas of pan-Africanists like Silvester Williams and Marcus Garvey, who laid the groundwork for liberation as early as the beginning of the 20th century.
After World War II, weakened European powers faced a new wave of liberation movements. During the Fifth Pan-African Congress in 1945, African leaders agreed to unite in their struggle against colonizers. Other factors also played significant roles, including the establishment of the UN, the influence of the USA and USSR, and the example set by independent India. By the 1960s, many countries, such as Ghana and Tanzania, had gained their freedom. However, some nations, like Portugal, retained their colonies until the 1970s, while apartheid continued in South Africa until the mid-1990s.