Moroccan invasion of the Songhai Empire

The Moroccan invasion of the Songhai Empire began with an expedition sent in 1590 by Sultan Ahmad al-Mansur of the Saadian dynasty, which ruled over Morocco at the time. The Saadian army, led by Judar Pasha, arrived in the Niger valley region (in present-day Mali) in 1591 and won its first and most decisive victory against the forces of Askia Ishaq II at the Battle of Tondibi and occupied the capital of Gao shortly after.

After this victory, however, the Moroccans struggled to have their authority accepted in the region and continued to wage a protracted war with the remnants of the defeated Songhai Empire. The Saadians did achieve their aim of controlling the Trans-Saharan trade routes, which secured a supply of gold and slaves. In the long term the Pashalik of Timbuktu, a small state centered on Timbuktu and controlled by the Arma people, continued to rule a territory stretching roughly from Gao to Djenné and nominally recognized the authority of the Saadian dynasty and the later Alaouite dynasty in Morocco as late as the 19th century. Trans-Saharan trade, however, ultimately declined as a result of the political fragmentation of the region and of the increasing European presence in West Africa.

The rise of Ahmad al-Mansur
Ahmad al-Mansur was the longest-reigning sultan of the Saadian dynasty, whose capital was in Marrakesh in Morocco. He came to power as a consequence of the crucial Battle of Ksar el-Kebir in northern Morocco in 1578. In that battle he had been part of the army of his brother Abd al-Malik, which successfully defeated a major Portuguese invasion force led by Sebastian I on behalf of Abd al-Malik's nephew, Muhammad Al-Mutawakkil, whom he had deposed two years earlier. Sebastian I, Al-Mutawakkil, and Abd al-Malik all died during the battle – with Abd-al-Malik possibly poisoned by one of his Turkish officers – which left Ahmad as the surviving victor of the battle and the new sultan on the Saadian throne. Drawing on the prestige of the victory, he took on the regnal title (laqab) "al-Mansur".

In the long term, Morocco's international standing was greatly increased, giving it the status of a major regional power in the western Mediterranean. The subsequent 24-year reign of Ahmad al-Mansur was among the longest in Moroccan history and marked the apogee of Saadian power and wealth. Despite the practical limits of his power abroad, Ahmad officially proclaimed himself caliph during his reign and saw himself as the rival, the Ottoman sultan, and even as the rightful leader of the Muslim world. He followed the earlier example of his brother Abd al-Malik by organizing his army along Ottoman patterns, staffing it with officers and instructors from Ottoman Algeria or of other Ottoman background (many of them non-Turkish). One consequence of this was a widespread adoption of firearms and artillery in the Moroccan military, which aided Al-Mansur in his subsequent conquests. In addition to local troops from the Sous and various tribes, the army also included troops from the Algerian Zuwawa tribe, Andalusian recruits, and European mercenaries.

The Songhai Empire
The Songhai had been the dominant force in Western Africa for more than a century, controlling the Western Sudan from the headwaters of the Senegal River to what is now Niger; however, a rivalry for succession after the 1583 death of Askia Daoud left the Empire in a weakened state.

Motivation
Al-Mansur's invasion of the Songhai Empire was the only major foreign campaign of his reign and was likely motivated by a number of factors. Trans-Saharan trade had long been an important part of Morocco's place in international trade and the tax revenues from it had contributed to funding the Saadians ever since their early days in the Sous. The expansion of European trade routes around the whole coast of Africa, however, had undermined its importance and reduced the flow of gold across the desert. Thus Al-Mansur may have sought to increase his access to gold through direct control of the gold mines in the south.

Saadian interest in the sugar trade may have also been a motivation, as control of the trans-Saharan trade routes also allowed him to increase Morocco's access to slaves – on which the sugar processing industry relied and which were necessary to compete with the prices of sugar coming from Brazil and the Caribbean (controlled by Europeans and also reliant on slaves).

Finally, the invasion may have been a way for Al-Mansur to elevate his claim to being a universal Muslim ruler. Since expansion eastward into Ottoman territory had been unfruitful the only path left for Saadian expansion was to the south. This ambition may have been further encouraged by the embassies of Idris Alooma, the Mai (king) of the Kanem-Bornu Empire, who, having failed to secure support from the Ottoman Empire, expressed willingness to recognize Al-Mansur as caliph instead.

Prelude
Saadian interest in the Sudan region preceded Al-Mansur. Earlier that century the Saadians occupied the oasis area of Touat for a time and Ahmad al-'Araj had asked Askia Ishaq I (r. 1539–1549), emperor of the Songhai Empire, to grant him control of the Taghaza salt mines. Since Al-Araj and his successors were preoccupied with challenges to the north, this claim was not pursued further. In 1543-4 a Moroccan force had occupied Ouadane, before retreating before a massive Songhai counterrattack. In 1584, another expedition died of thirst.

In 1583 or 1584, Al-Mansur brought the Taghaza issue up again with Emperor Askia Dawud (r. 1549–1582), asking him to pay the equivalent of the mines' tax revenues. In 1583 Al-Mansur's forces successfully occupied the Touat and the Gourara oases. In 1589 or early 1590 he then asked Askia Ishaq II to pay him an amount of gold proportional to the amount of salt taken from the mines, which Ishaq II contemptuously refused.

Invasion and subsequent conflict
The Saadian military expedition, left Marrakesh on October 16, 1590, and reached the Niger River in February 1591. Estimates of the army's size differ between sources, varying between 4000 and 20,000 men. with differing It was led by Judar Pasha, a commander of Spanish origin. The Saadian army suffered while crossing the desert, but Askia Ishaq II was surprised when they arrived and had to assemble his forces quickly. While the Songhai army was reportedly larger, it lacked firearms, unlike the Moroccans. At the Battle of Tondibi the Saadian army thus won a decisive victory. The Songhai evacuated their capital, Gao, and retreated south, while Judar Pasha's army occupied Gao along with Timbuktu (both in present-day Mali).

Judar and his forces were disappointed by the lack of riches that they found in the emptied Songhai capital, and diseases soon beset the Moroccan army. Ishaq II sent a peace offering to Judar, proposing that the Saadian army withdraw while the Songhai would pay tribute to Al-Mansur, including an offer of 100,000 gold pieces and 1000 slaves. Judar withdrew from Gao to Timbuktu and sent the proposal to Al-Mansur, along with information about the poverty of the spoils. Al-Mansur reacted with outrage, having expected Judar to press his advantage and take control of the Songhai gold mines. He sent Pasha Mahmud ibn Zarqun, along with reinforcements, to relieve Judar of duty. Mahmud arrived in August 1591 and demoted Judar to second-in-command. Mahmud Pasha, in turn, won a less decisive victory against the Songhai at the Battle of Bamba in October 1591 but was unable to capture Ishaq II. This encouraged Ishaq II, who renewed his military efforts and encouraged the inhabitants of Timbuktu to revolt. However, his brother Muhammad Gao declared himself the new Askia (king) by claiming that Ishaq II's military defeats had disqualified him as leader. Ishaq II attempted to have his brother arrested but soon lost all support and died that year.

Mahmud Pasha, for his part, adopted harsher tactics in dealing with the remaining resistance. He built a kasbah (citadel) to control Timbuktu, where he used draconian measures to suppress local resistance, including a city-wide revolt between October 19 and December 17. In 1592 he began a new large-scale offensive against the Songhai army, while Judar Pasha occupied Gao. The new Askia, Muhammad Gao, responded with a peace offering, which Mahmud feigned to accept on the condition that the Askia come to his camp to negotiate the terms directly. While some of his advisors warned him not to go, Muhammad Gao agreed and travelled to the Pasha's camp along with 63 or 83 other dignitaries. Mahmud received them with honour and hosted a lavish feast for them, but during the feast he secretly ordered his soldiers – speaking to them in Spanish so they wouldn't be understood by others – to arrest all of the guests. The Askia and his companions were sent as prisoners to Judar in Gao.

Revolts continued to erupt against the Saadian occupation, while Mahmud Pasha installed Sulayman, another brother of the former Songhai king, as Askia, attempting to create a system of indirect rule. Resistance leaders refused to recognize him, however, and elected another leader, Nuhu, as their Askia. Nuhu became the ruler in the now diminished Songhai Empire which was centered in the empire's only surviving province, the Dendi province further south (present-day southwestern Niger) near the Niger River, but the old Songhai Empire was now gone and was unable to regain the Sudan region. Over the next two years the remaining Songhai resistance – who had by now adopted firearms too – engaged in effective guerrilla warfare. Mahmud Pasha, in turn, attempted to conquer them in Dendi but encountered stiff resistance and difficult conditions in the unfamiliar hot and mosquito-riddled environment of the Niger region. At one point he returned to Timbuktu in September 1593 where he became increasingly involved with a dispute with the city's ulema (Islamic scholars), some of whom had complained to Sultan Al-Mansur in Marrakesh about the brutality of the Saadian troops. Eventually Mahmud had them all arrested – including the famous Ahmad Baba – and deported to Marrakesh in April 1594.

Dissensions and rivalries escalated within the Saadian army until Sultan Al-Mansur lost confidence in Mahmud Pasha too and ordered a new pasha, Mansur ibn Abd al-Rahman, to replace him and execute him in 1595. Mahmud Pasha was tipped off ahead of time and tried instead to leave on another attack against rebels in the mountains, where he died in January 1595. Judar was given control over administrative affairs while Mansur ibn Abd al-Rahman was given control of the army. The latter died in November 1596, possibly poisoned by the former. Judar, who had the support of the troops, remained more or less in command of the Saadians in the region, though other pashas were sometimes sent afterward from Morocco and many of them also quickly met untimely ends. Judar was finally himself recalled in 1599.

Aftermath
In the aftermath of the Battle of Tondibi the Songhai Empire effectively collapsed and none of the later successor states in the region were able to rebuild its former power. The ruler of the Mali Empire, Mahmud IV, saw the collapse of the Songhai Empire to the north as a opportunity to restore some of his empire's former authority in the Niger region. In 1599 he launched an assault against Djenné, but he was defeated by Saadian reinforcements from Timbuktu. The Mali Empire was unable to reestablish power in the region after this.

In the end, Moroccan control had been tenuously established over a large region stretching between Kukiya (also spelled Koukya or Koukiya) and Djenné, around the northern curve of the Niger River. Dissension continued to undermine the Moroccan occupation, but in 1599 Nuhu was himself overthrown and the post-imperial Songhai fell into disorder for several years. While Saadian control of the region did not last long after Ahmad al-Mansur's death, the conquered region nonetheless sent a caravan of riches and supplies to Marrakesh every year during this period. It provided Al-Mansur's realm with gold, slaves, and ivory, as well as exotic animals such as elephants for the first time. Saadian gold nonetheless had difficulty competing with the abundant high-quality gold shipped from the Spanish colonies in the Americas, and the caravans themselves were costly. A part of their function was to provide an impressive display to the inhabitants of Marrakesh and to the sultan's guests every year.

After Al-Mansur's death in 1603 the Saadian Sultanate was plunged into civil war between his sons vying for the throne. The conflict continued until 1627 and central rule in Morocco greatly deteriorated as a result. Moulay Zaydan, who managed to hold onto the capital of Marrakesh for much of this period, relinquished direct control over the Sudan territories in 1618 when its governors ceased to be appointed from Marrakesh and were instead chosen by the local troops themselves. Thereafter the local Saadian regime became the Pashalik of Timbuktu, ruled by the Arma people, the mixed descendants of Moroccan soldiers and local inhabitants, who were nominally subject to Morocco until the early 19th century.

After the conflict, trade in the western Sahara through Oualata and Ouadane, took until 1620 to recover. The fragmentation and decline of strong central rule in the region contributed to the decline of Timbuktu and the trans-Saharan trade routes overall, while European merchants increasingly diverted trade through the Atlantic network.