The Songhai Empire was a state located in the western part of the Sahel during the 15th and 16th centuries. At its peak, it was one of the largest African empires in history. The state is known by its historiographical name, derived from its largest ethnic group and ruling elite, the Songhai people. Sonni Ali established Gao as the empire's capital, although a Songhai state had existed in and around Gao since the 11th century. Other important cities in the kingdom were Timbuktu and Djenné, where urban-centred trade flourished; they were conquered in 1468 and 1475, respectively. Initially, the Songhai Empire was ruled by the Sonni dynasty (c. 1464–1493), but it was later replaced by the Askia dynasty (1493–1591).
During the second half of the 13th century, Gao and the surrounding region had grown into an important trading center and attracted the interest of the expanding Mali Empire. Mali conquered Gao near the end of the 13th century. Gao remained under Malian command until the late 14th century. As the Mali Empire started disintegrating, the Songhai reasserted control of Gao. Songhai rulers subsequently took advantage of the weakened Mali Empire to expand Songhai rule.