Aghlabid Basins
The Aghlabid Basins or Aghlabid Reservoirs are a series of historic water reservoirs and hydraulic works in Kairouan, Tunisia. They were built under Aghlabid rule in the 9th century to supply the city with water. Historical background 
Kairouan, founded by the Arab-Muslim conquerors in 670, is located in the middle of an arid steppe. Unlike most major towns of the era, it was not near a river or other abundant source of water, which meant that the provision of water was a perennial concern. According to the 11th-century Andalusi geographer al-Bakri, the Umayyad caliph Hisham (r. 724–743) ordered the construction of 15 water reservoirs outside Kairouan, but these have not survived to the present day. In the 9th century, when Kairouan was the center of the Aghlabid Emirate, which governed the region nominally on behalf of the Abbasid Caliphs, the Aghlabid ruler Abu Ibrahim Ahmad (r. 856–63) commissioned the construction of the two large reservoirs which are still visible today. They were built between 860 and 862 and the construction was supervised by Khalaf al-Fata, an emancipated slave who served Abu Ibrahim Ahmad. Many of the city's residents lived in houses that were supplied by their own private wells and cisterns, so the water from these reservoirs was used to supplement them in times of drought or to supply water to livestock and caravans. Another Aghlabid water reservoir that has been preserved up to modern times was built to supply their new capital at Raqqada (founded in 876), near Kairouan. It has a trapezoidal form, with the longest side measuring 182 metres long. Form and function 

There are two surviving reservoirs today, located close to each other at a short distance north of the old city (medina) of Kairouan. The reservoirs functioned as settling tanks which partially purified the water before it was supplied to the city. Both reservoirs are composed of several connected sections: a smaller water basin, a larger basin, and a set of covered water tanks. The basins, circular in appearance, are built with rubble stone and covered in a waterproof coating, with rounded tops and edges. Their walls are reinforced with semi-circular buttresses both on the inside and outside. For the larger (western) reservoir, the small basin is a 17-sided polygon measuring 37.4 metres in diameter. It has a capacity of 4000 cubic metres. Water from the countryside was channeled into this basin first, where sediments fell and were deposited. When the water level was high enough, water from this basin then flowed into the larger basin to the southeast via an outlet. The larger basin is a 48-sided polygon measuring 128 metres in diameter. The basin is 4.8 metres deep and has a capacity of over 57,000 cubic metres. Here water was stored for further use, while undergoing some further filtration. Lastly, the water was allowed to flow into two small rectangular cisterns on the large basin's southeast side. These cisterns are covered by barrel vaults supported by arches supported by pillars. The vaulted ceilings are pierced by six openings through which water could then be drawn. In the middle of the largest water basin today is a polylobed masonry pillar which may have been part of the foundations of a leisure pavilion used by the rulers. This pavilion is described by al-Bakri (the aforementioned 11th-century writer), according to whom it was an octagonal tower topped by an open-sided kiosk covered by a dome. The pillar is 2.85 metres wide but Georges Marçais suggested that the pavilion was likely supported by corbels which would have allowed it to have a wider floor. Water sources 

During the Aghlabid period, water was brought to the city and the reservoirs from the surrounding plains and lowlands by drawing it from Oued Merguellil and its tributaries. The waters were diverted by a system of small dams, weirs, and canals to the reservoirs. An aqueduct was also built that brought water from springs in the Shreshira (or Chrechira) Mountains, 36 kilometres west of Kairouan. It was probably also built during the Aghlabid period, but made use of some existing Roman-era infrastructure. Later, in 961, the Fatimid caliph al-Mu'izz refurbished the aqueduct, adding a second canal on top of the aqueduct's earlier canal. The Fatimid aqueduct diverted water first to Sabra al-Mansuriyya, the new Fatimid capital built near Kairouan, before the remaining water was brought to the main city's reservoirs. A 70-metre-long elevated section of this aqueduct, crossing over a ravine, has been preserved near the present town of Haffouz. References

Further reading 
 

Aghlabid architecture
Kairouan