The royal kingdoms of Ghana, Mali and Songhai were empires that ruled parts of West Africa from the first millennium A.D. until 1591. The Ghana Empire came first, followed by Mali and then Songhai.
The Ghana Empire existed in what is now northern Senegal and southern Mauritania, about 400 miles northwest of modern Ghana. The exact time of the empire's formation remains unknown, but it occurred when clans of the Soninke people joined under the leader Dinga Cisse. Mines on the upper Senegal River supplied gold, and the empire prospered from the trans-Saharan trade in gold and salt. Ghana declined in the 11th and 12th centuries because of drought, the loss of its monopoly of gold and attacks by the Sosso people.
The Mali Empire arose under the leadership of Sundiata Keita, who defeated the Sosso in 1235. Sundiata then assumed leadership of all the Mandinke clans. The empire derived much of its wealth from gold and the salt trade. At its peak in the 14th century, it extended 1,200 miles in width and included territory in modern Mali, Mauritania, Senegal and Guinea. Ineffective rulers and attacks by neighboring peoples led to the decline of Mali.
A small Songhai state had existed around Gao, in modern day Mali, since the 11th century. By 1450, the Songhai Empire had replaced Mali as the dominant power in the region. It occupied much of the territory of modern Mali and Niger and parts of other modern countries including Nigeria and Senegal. At its greatest extent, it surpassed the size, wealth and power of the Mali Empire.
A war of succession beginning around 1582 weakened the Songhai Empire. The empire came to an end in 1591 when Moroccan soldiers defeated Songhai forces at the Battle of Tondibi.