Here's a breakdown of the key factors:
* Moroccan firearms were not significantly more advanced: While they did have firearms and cannons, the technology was still relatively primitive compared to later developments. The Songhai army also had some firearms and even a few cannons, but they were less numerous.
* Moroccan gunpowder was scarce: They were initially able to surprise the Songhai with their gunpowder weapons, but their limited supply meant they couldn't sustain heavy bombardment.
* The Songhai army was vastly outnumbered: The Moroccan army, though better equipped, was outnumbered by the Songhai forces.
* The Songhai were weakened by internal conflict: The empire was already facing internal strife and rebellions before the Moroccan invasion, which significantly hampered their defense.
The real reasons for the Songhai's defeat:
* The Moroccan's superior cavalry: The Moroccan army had highly skilled and well-trained cavalry, a decisive factor in the open battlefields of the Sahel.
* The strategic use of gunpowder weapons: The Moroccans strategically used their limited gunpowder weapons to break the Songhai's formations and disrupt their attacks.
* The Songhai's vulnerability to surprise: The Songhai army was caught off guard by the Moroccan attack, and their leadership was poorly coordinated.
Therefore, while the Moroccan firearms played a role, the Songhai Empire's downfall was ultimately a result of a combination of factors: internal strife, poor leadership, an outnumbered army, and the strategic use of gunpowder weapons by the Moroccans.