The correct answer is - the European colonization.
The coastal kingdoms of Africa were relatively well developed. They controlled the trade in this part of the world, and became very wealthy. Big portion of the wealth was also from selling slaves to the Europeans. But the tensions grew between the European colonial powers and the coastal kingdoms, and after few incidents where European convoys were destroyed, the Europeans attacked. The Europeans had professional soldiers and much better weapons, so they did not really had any troubles in defeating the locals. That marked the end of the coastal kingdoms, and the beginning of the European colonialism i that part of the world.