The Aghlabid Cisterns are the only two remaining pools of a 15 pool water system that was among the most advanced in the world at the time. They were constructed under the orders of Prince Abu Ibrahim Ahmad in 862/248 AH under the supervision of Khalaf al-Fata, his emancipated slave. The Aghlabid Pools are composed of a small pool called all-Fisqiya (the reservoir), in the shape of a 17-sided polygon, and a larger cistern that is 4.8 meters deep. Sediments are allowed to settle out of the water in the small pool until a certain level is reached. At that point, it is transferred to the large pool through an opening known as esarh (the outlet). The water comes from rain and the wadi Merguell via a set of small dams and a canal.