This article begins with a detailed structural analysis of "Zajal 90" by the Andalusī poet Ibn Quzmān (d. 555/1160). On the basis of this analysis, It is concluded that the poem employs irony to condemn the anti-Berber prejudice prevalent among native Andalusīs in Almoravid-ruled twelfth-century al-Andalus. It is also pointed out that the poem shares a number of key features with the maqāma genre, and may, in fact, be viewed as a maqāma in verse. The article then ascribes the invention of the maqāma genre by al-Hamadānī (358/969-398/1008) in the East, as well as its cultivation by al-Saraqustī (d. 538/1143) in the West, to two separate but parallel crises in literary patronage that took place (1) when the Persian-speaking Buwayhids reduced the Arab Abbāsid caliphs to puppets in Iraq (334/945), and (2) when the Berber-speaking Almoravids deposed the Arabic-speaking mulūk al-tawā if (448/1056) in al-Andalus. The article concludes by drawing a parallel between the above crises in literary patronage, and the rise of the shadow play, as it was cultivated by Ibn Dāniyāl (d. 710/1310), in late thirteenth-century Egypt, under the régime of the Mamlūk Sultan Baybars I (r. 658/1260-676/1277). Finally, the article attempts to illustrate how certain crises in literary patronage - resulting in the abandonment of the courtly, panegyrical qasīda - often led to extremely creative attempts at incorporating popular genres into the canon of formal Arabic literature.