Most nations in Africa were colonized by European states in the early modern era, including a burst of colonization in the Scramble for Africa from 1880 to 1900. But this condition was reversed over the course of the next century by independence movements. Here are the dates of independence for African nations.
Liberia was the first African republic to proclaim its independence and is the continent's first and oldest modern republic. It was not colonized like the other countries in the top 5, mostly from Britain.
Source: ThoughtCo, Wikipedia