The Sfax medina is the medina quarter of the Tunisian city of Sfax. It was built by Aghlabid prince Abu Abbass Muhammad between 849 and 851. The medina is home to about 113,000 residents, and is dominated by the Great Mosque of Sfax.
On 12 February 2012, the Tunisian government submitted a demand to add it on the UNESCO UNESCO World Heritage List. It is considered one of the rare medieval cities of North Africa to keep its original weft even with all the modifications of its buildings throughout the decades. It represents also the best example of the most conserved Arab-Muslim town planning in all the Mediterranean Basin. Its monuments are classified as national historical monuments since 1912.
History
Historic sources talk about the existence of a Roman city around the zone in which Sfax now exists called Taparura. The absence of tremendous monuments that used to distinguish Roman cities made it possible to think that either Sfax was built completely above Taparura, or that Taparura was not much more than a watchtower as its name exactly means in Greek, and so does "Ksar-Esfakez", original form of Sfax's name in berber-punic. What is however very likely is that the former Taparura is associated with the Arab-era Kasbah.
According to the inscriptions at the facade of the great mosque, the medina of Sfax was founded following the orders of the Aghlabid emir (prince) of Kairouan Abu Abbass Muhammad in 849, by Ali Ibn Salem, cadi of Sfax. In fact, in the middle of the ninth century, the Aghlabids who used to rule Ifrikia agreed on supporting the city's shores with forts and trusses, that's when Borj Sfax or Kasbah of Sfax was built as one of the forts, but as time passed and life evolved around it the Aghlabid decided to build the city of Sfax.
Fatimid era
With the fall of the majority of the Aghlabid State in the hands of the Fatimids, Sfax suffered its first crisis since its foundation, when attacked among other cities in 914 by the ruler of Sicily, Ahmed bin Gharb, a strong supporter of the Abbasids, in order to recover the cities of the African coast held by the Fatimids. This conflict ended with the victory of the Sicilian army and the destruction of the city as a punishment upon its inhabitants, even if the Fatimids quickly took control of the city thereafter. However, the locals did not integrate the Ismaili rite brought by the new state and remained faithful to their Maliki doctrine thanks to the support of a great scholar, Abu Ishaq Aljbinyani.
Zirid era
After the transfer of the center of Fatimid power to Cairo, the Zirid governors decided to separate from the Fatimid rule and return to sunnism, prompting the Fatimids to seek revenge by sending Arab tribes from the south to destroy Ifriqiya.
Despite all these disturbances, Sfax saw an important cultural renaissance especially an architectural one during the reign of the Zirids. One of the most significant changes taking place in the city during this period is the remarkable improvement that the great mosque underwent under the rule of the Sanhaji Prince Abi Al-Fotuh Al-Mansour in 988.
In 977, the traveler Ibn Hawqal described the city as: "surrounded by a beautiful olive grove. The oil that is made here is exported to Egypt, the Maghreb, Sicily and Europe (Roum) [...] Kerkennah contains some remains of old buildings and several cisterns. As this island is very fertile, the inhabitants of Sfax send their cattle there to graze ".
During this time also, the city witnessed its first invasion when it passed under the control of Ibn Melil from 1067 to 1099 with the support of Hilalis and Banu Sulaym.
Norman invasion
At the end of the reign of the Zirid dynasty, between 1148 and 1156, the Normans of Sicily occupied the city, representing Sfax's first non-Islamic occupation since its foundation. This conflict ended with the execution of Sheikh Abu El Hassan El Feriani by the Normans, but on the other hand, Sfax got its independence with Omar Feriani, son of the Sheikh until the arrival of the Almohads from Morocco.
Almohad era
The Almohads ruled Sfax from 1159 to 1198. During these 39 years, the city saw several crises. It was not until 1204 that the situation stabilized thanks to the intervention of Emir Muhammad al-Nasir who eliminated the Banu Ghania, who were behind many of the local conflicts. During this period of stability, 366 wells were dug in a place near the medina, that took later the name of Al Nasiriya, named after the Emir.