Hafsid Dynasty
The Hafsid state was a Berber sultanate in Ifriqiya (present-day Tunisia and eastern Algeria) with its capital at Tunis, existing from 1229 to 1574. The dynasty's founder Abu Zakariya Yahya was an Almohad governor who declared independence, and his son al-Mustansir took the title of caliph; in 1270 King Louis IX of France died on crusade outside Tunis. In the 16th century Tunis became a battleground between Spain and the Ottoman Empire, and in 1574 the Ottomans took it for good.