Abu Abdallah al-Qaim

Abu Abdallah Muhammad ibn Abd al-Rahman al-Qaim bi-Amr Allah,  (القائم بأمر الله السعدي) often shortened to Abu Abdallah al-Qa'im or Muhammad al-Qa'im, was the first political leader of the Saadi Dynasty of Morocco. He ruled the Sous and other parts of southern Morocco from 1510 to 1517, setting the stage for his sons to lead the dynasty to power over the rest of Morocco in the decades after his death.

Background
The Saadians were a Sharifian family from Tagmadert in the Draa River valley that claimed descendance from Muhammad through Fatimah. They migrated to the Draa valley in the 14th century before moving or spreading to Tidsi in the Sous valley in the following century. Here they lived alongside Sufi teachers and marabouts who promoted the doctrines of al-Jazuli.

According to one traditional account, when Abu Abdallah visited Medina he dreamed of two lions entering a tower with a crowd of people close behind. Taking his vision to a Sufi sheikh, he was told that his two sons would have an important future in his country. Upon returning to Morocco he began to broadcast the vision among his people, who believed him, according to Moroccan historian al-Nasiri, because of his reputation for honesty, and he adopted the Mahdist title "al-Qaim bi Amrillah" (the one called by God).

Al-Qa'im's rise to power took place in the context of weak central rule in Morocco and of Portuguese expansionism along its Atlantic coast. The Wattasid dynasty, which ruled from Fez in the north, had little authority over the south of the country. Under their reign, Portuguese expansion along the Moroccan coast reached its apogee. Many local resistance and jihad movements, often associated with various Sufi brotherhoods or establishments, arose to oppose the European presence. In 1505 the Portuguese occupied Agadir (on the coast, near the mouth of the Sous river), which they called Santa Cruz do Cabo de Aguer, and from their territory here other European merchants also operated, notably the Genoese. This arrival of European traders and colonisers alarmed the local population and caused the inhabitants of the Sous region to organize themselves politically. According to one recorded tradition, this impetus was made clear when the Portuguese took some tribal warriors captive and demanded that the local tribes choose a leader or representative with whom they could negotiate their release.

Political leadership
It was in this context that in 1510 that Abu Abdallah was formally recognize in Tidsi as the military leader and political representative of the tribes and Sufi groups of the Sous vallery. He then sent his two sons Ahmad al-Araj and Mohammed Amghar (later called Mohammed ash-Sheikh) to Fez, where they established themselves as teachers of religion and literature and exhorted the sultan to raise a full jihad in the south. Tidsi remained Al-Qa'im's base for three years until he moved to Afughal in the Haha region in 1513, the burial site of Al-Jazuli. This was done at the invitation of the Shayazima tribe, which had been involved decades earlier in a rebellion against the Wattasids. This associated the early Saadians with both the followers of al-Jazuli and with an implicit opposition to the Wattasids.

In 1513 Al-Qa'im also appointed his elder son Ahmad al-'Araj as his successor and left him as governor in the Sous while he moved to Afughal. The Sous valley was a crucial stage in the trans-Saharan trade routes and, despite the jihad against Portuguese encroachment, European trade also increased in the region, all of which brought great profit to Al-Araj and to the Saadian movement. In 1515 the Saadians helped repel a Portuguese attack on Marrakesh but they were not yet in a position to claim the city for themselves.

Death and burial
Upon Al-Qa'im's death in 1517 he was buried next to Al-Jazuli in Afughal. When his son Ahmad al-Araj took control of Marrakesh in the 1520s he arranged for the remains of his father and of Al-Jazuli to be transferred to Marrakesh, founding a new funerary complex (the Zawiya of Sidi Ben Slimane al-Jazuli), which symbolically cemented the city's status as spiritual and political capital of the Saadian realm.