Kasbah of Sfax

Kasbah of Sfax is a kasbah, an Islamic desert fortress, located in the southwestern corner of the ancient city of Sfax. It was used for different purposes throughout the history: it was first a control tower built by the Aghlabids on the coast, then the seat of the municipal government, and then the main army barracks. Its construction was preceded by the deployment of the wall and the medina quarter. Today it serves as a museum of traditional architecture.
History
Establishment
The kasbah was established as a part of a coastal surveillance and security campaign carried out by the Aghlabid state's main troops, which gained independence and proceeded to conquer Ifriqiya in the early 9th century. They were in control of a series of 10 observation towers along the coast of Sfax. Among these newly constructed towers was the kasbah, built as the watchtower of Sfax, on top of an ancient palace in the south of Mahares they inherited from previous civilizations that ruled the region. The Kasbah was established directly to the sea before it receded inland after centuries of renovations. It consisted of two high towers for monitoring of the sea and communication with surrounding towers through exchanging of fire signals, two mosques, and an underground facility which was possibly assigned as a prayer room during the state of emergency.
Seat of administration
Along with the development of the Aghlabid Dynasty, and the expansion of the ribat in the city occupied the south-west corner, the kasbah became the state's centerpiece, where the seat of the government was located. It also acted as the seat of the governors who managed the supervision of the city over the successive dynasties that traded the rule of Ifriqiya as a whole or the modern Tunisian region, namely the Fatimids, Zirids, Almohads and Hafsids. At the end of the Hafsid Dynasty, the Hafsid ruler Abu Abdullah al-Makeni took over the city from the central authority.
Military barracks
When the Ottomans came, the state's administrative system changed. The governor became the local ruler, and the kasbah ceased to be the center of administration. Aga was the local military ruler who was tasked for subjugation of the country. It became responsible for all the kasbahs and the guards, and acted as de facto ruler of the city. The situation remained as it was during the direct rule of the Ottomans. With the arrival of Husayn al-Bayts however, the role of aga declined at the expense of kaid, the title given to the Husayn rulers, and the situation of the army slowly deteriorated. With the fall of the region in the hands of the French occupation in 1881, the French Gendarmerie replaced the Ottoman Turkish military, and then replaced by the Tunisian National Guard briefly after the independence of Tunisia and conversion into a republic.
Modern era
In the 1980s, after the Kasbah was neglected for a period of almost 20 years, it was transformed into a museum of the traditional architecture of Sfax, which has different characteristics from the rest of the region. The project was overseen by Zouari. The building was considered as a perfect fit as it contains several unique architectural elements. The museum hosts a gallery of various building techniques and tools, or sectional model of the fences. The upper mosque has become an exhibition of religious establishments in the old city. Art Gallery of Mohammed Al-Vandari, a gallery of fine arts, was created at the place where the prison of the Kasbah existed.
References
Abbasid architecture
Buildings and structures completed in the 9th century
Kasbahs in Tunisia
Medina of Sfax