Founding of Emir Abd al-Qadir's state: centralization of the resistance in western Algeria
The resistance that had dispersed after the fall of Algiers gathered around the young Abd al-Qadir, son of the Qadiri sheikh Muhyiddin; on 22 November 1832, near Mascara, the tribal chiefs pledged allegiance to him with the title 'commander of the faithful.' The structure he established was not a tribal alliance but a regular state: it had a mint, a gunpowder workshop, a tax system and a capital at Tagdempt. France formally recognized his sovereignty by the Treaty of Tafna of 1837. Abd al-Qadir took refuge not with the Ottomans but under the suzerainty of the Moroccan sultan Abd al-Rahman; that is, these lands were not under Ottoman allegiance after 1832. He surrendered on 23 December 1847, and the Ottoman State declared in the same year that its rights over Algeria had ended.