In 1590 the Sa'did sultan Ahmad al-Mansur sent an army of a few thousand men, built around musketeers and led by Judar Pasha, across the Sahara against Songhay, the dominant power of the Niger bend; its firearms routed the Songhay army at Tondibi in March 1591, after which Gao and Timbuktu were occupied. Lansiné Kaba's study in the Journal of African History links the invasion to Mediterranean rivalries and Sa'did ambitions to control the gold trade, and shows the occupiers bogged down in a long resistance led by Askiya Nuh in the southern swamps. Urban and rural revolts brought repression: in Timbuktu Pasha Mahmud ibn Zarqun had merchants and scholars arrested in late 1593, their houses ransacked and some prisoners killed, and in 1594 the qadi 'Umar, Ahmad Baba and other scholars were deported to Marrakesh, where much of Ahmad Baba's library was lost. By 1612, Kaba writes, the musketeers refused to fight the Songhay archers and Morocco was losing control of its troops; the Arma garrison became a self-governing pashalik. The occupation also organised the despatch of gold and captives to Morocco; that traffic is counted in 'The Trans-Saharan Slave Trade, 1450–1750', and this entry covers the conquest, occupation and the deportation of the scholars.
A Sa'did Moroccan expeditionary army of musketeers sent by Ahmad al-Mansur destroyed the Songhay empire, occupied the Niger bend and deported Timbuktu's leading scholars to Morocco
No defensible total exists. The Timbuktu chronicles record killings in particular episodes, including scholars killed outside the city walls in 1593 and heavy losses in the fighting against Askiya Nuh, but give no overall count; casualty figures that circulate online for the war as a whole are unsourced or unclear about which side they refer to.
Kaba documents the repression and exile of the scholars; the arrest, ransacking of homes and killing of imprisoned scholars in 1593 are drawn by Wikipedia from al-Sa'di's Ta'rikh al-Sudan, and the University of Cape Town manuscripts project records the destruction of much of Ahmad Baba's library.
Mali, Morocco