During the second half of the 13th century, Gao and the surrounding region had grown into an important trading centre and attracted the interest of the expanding Mali Empire.
Askia Ishaq II, the last ruler of the Songhai Empire, ascended to power in a long dynastic struggle following the death of Daoud.
In 1590, Al-Mansur took advantage of the recent civil conflict in the empire and sent an army under the command of Judar Pasha to conquer the Songhai and gain control of the trans-Saharan trade routes.
The Songhai Empire has been variously translated in texts as Zagha, Zaghai, Zaghaya, Sughai, Zaghay, Zaggan, Izghan, Zaghawa, Zuwagha, Zawagha, Zauge, Azuagha, Azwagha, Sungee, Sanghee, Songhai, Songhay, Sughai, Zanghi, Zingani, Zanj, Zahn, Zaan, Zarai, Dyagha, and possibly Znaga.
The Sorko fashioned boats and canoes from the wood of the cailcedrat tree, fished and hunted from their ships, and provided water-borne transport for goods and people.
[citation needed] The other group known to have inhabited the area were the Do people, farmers who raised crops in the fertile lands bordering the river.
[4]: 49 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").
By the 10th century, the Songhai chiefs had established Gao as a small kingdom, taking control of the people living along the trade routes.
When Akilu heard of the coming of Sonni Ali, he brought a thousand camels to carry the fuqaha of Sankore and went with them to Walata.....
[citation needed] Askia completed one of the Five Pillars of Islam by taking a hajj to Mecca, bringing a large amount of gold.
[15] Islam was so important to him that, upon his return, he established more learning centres throughout his empire and recruited Muslim scholars from Egypt and Morocco to teach at the Sankore Mosque in Timbuktu.
[citation needed] During his reign, Islam became more entrenched, trans-Saharan trade flourished, and the salt mines of Taghaza were brought within the empire's boundaries.
Following the death of Emperor Askia Daoud in 1583, a war of succession weakened the Songhai Empire and split it into two feuding factions.
[17] During this period, Moroccan armies annihilated a Portuguese invasion at the Battle of Alcácer Quibir, but were left on the verge of economic depletion and bankruptcy, as they needed to pay for the defences used to hold off the siege.
This led Sultan Ahmad I al-Mansur of the Saadi dynasty in 1591 to dispatch an invasion force south under the eunuch Judar Pasha.
[18] The Moroccan invasion of Songhai was mainly to seize and revive the trans-Saharan trade in salt, gold and slaves for their developing sugar industry.
After a march across the Sahara desert, Judar's forces captured, plundered, and razed the salt mines at Taghaza and moved on to Gao.
When Emperor Askia Ishaq II (r. 1588–1591) met Judar at the 1591 Battle of Tondibi, Songhai forces, despite vastly superior numbers, were routed by a cattle stampede triggered by the Saadi's gunpowder weapons.
[19]: 308 After the empire's defeat, the nobles moved south to an area known today as Songhai in current Niger, where the Sonni dynasty had already settled.
They formed smaller kingdoms such as Wanzarbe, Ayerou, Gothèye, Dargol, Téra, Sikié, Kokorou, Gorouol, Karma, Namaro and further south, the Dendi which rose to prominence shortly after.
James Olson described the Songhai labour system as resembling trade unions, with the kingdom possessing craft guilds that consisted of various mechanics and artisans.
Results of a trial were announced by the "town crier", and punishment for most trivial crimes usually consisted of confiscation of merchandise or even imprisonment since various prisons existed throughout the Empire.
Jurists were mainly composed of representatives of the academic community; professors were often noted as taking administrative positions within the Empire, and many aspired to be qadis.
Sonni Ali established a system of government under the royal court, later to be expanded by Askia Muhammad, which appointed governors and mayors to preside over local tributary states around the Niger Valley.
Under his policies, Muhammad brought much stability to Songhai, and great attestations of this registered organization are still preserved in the works of Maghreb writers such as Leo Africanus, among others.
[citation needed] The emperor was the strategist and commander-in-chief of the military, and the balama acted as minister of defence and army general.
He was assisted by two vice-admirals at the ports of Kabara and Ayourou and commanded over a thousand captains, ensuring the rapid movement of troops along the Niger River.
[40] According to a report published by Nordic Africa Institute, the Songhai Kanta "could carry up to 30 tons of goods, i.e. the load capacity of 1,000 men, 200 camels, 300 cattle or a flotilla of 20 regular canoes (Mauny, 1961).
Some of these boats had an even greater load capacity of 50 to 80 tons (Tvmowski, 1967).”[a] Names and dates taken from John Stewart's African States and Rulers (2005).