information:extraction
Gao and Mali

The earliest dynasty of kings is obscure, and most information about it comes from an ancient cemetery near a village called Saney, close to Gao. Inscriptions on a few of the tombstones in the cemetery indicate that this dynasty ruled in the late 11th and early 12th centuries and that its rulers were given the title of Malik (Arabic for "King"). Other tombstones mention a second dynasty whose rulers bore the title zuwa. Only myth and legend describe the origins of the zuwa. The Tarikh al-Sudan (History of Sudan), written in Arabic around 1655, provides an early history of the Songhai as handed down through oral tradition. It reports that the founder of the Za dynasty was called Za Alayaman (also spelt Dialliaman), who originally came from Yemen and settled in the town of Kukiya. What happened to the Zuwa rulers is yet to be recorded.

The Sanhaja tribes were among the early people of the Niger Bend region. These tribes rode out of the Sahara Desert and established trading settlements near the Niger. As time passed, North African traders crossed the Sahara and joined the Tuaregs in their settlements. Both groups conducted business with the people living near the river. As trade in the region increased, the Songhai chiefs took control of the profitable trade around what would later become Gao. Trade goods included gold, salt, slaves, kola nuts, leather, dates, and ivory.

By the 10th century, the Songhai chiefs had established Gao as a small kingdom, taking control of the people living along the trade routes. Around 1300, Gao had become prosperous enough to attract the Mali Empire 's attention. Mali conquered the city, profited from Gao's trade, and collected taxes from its kings until about the 1430s. Conflict in the Malian homeland made it impossible to maintain control of Gao. Ibn Battuta visited Gao in 1353 when the town was still a part of the Mali Empire. He arrived by boat from Timbuktu on his return journey from visiting the capital of the empire, writing:

Then I travelled to the town of Kawkaw, which is a great town on the Nīl, one of the finest, biggest, and most fertile cities of the Sūdān. There is much rice there, milk, chickens, fish, and the cucumber, which has no like. Its people conduct their buying and selling with cowries, like the people of Mālī.

Following the death of Mansa Sulayman in 1360, disputes over who should succeed him weakened the Mali Empire. The reign of Mari Djata II left the empire in poor financial condition, but the kingdom itself passed intact to Musa II. Mari Djata, Musa's kankoro-sigui, put down a Tuareg rebellion in Takedda and attempted to quell the Songhai rebellion in Gao. While he succeeded in Takedda, he did not re-subjugate Gao. In the 1430s, Songhai, previously a Mali dependency, gained independence under the Sonni dynasty. Around thirty years later, Sonni Sulayman Dama attacked Méma, the Mali province west of Timbuktu.