 Windpumps were used to pump water since at least the 9th century in what is now Afghanistan, Iran and Pakistan.The Islamic period in the Fayyum depression of Middle Egypt, like medieval Islamic Spain (al-Andalus), was characterised by extremely large-scale systems of irrigation, with both the supply, via gravity-fed canals, and the management of water under local tribal control.In the Islamic period in al-Andalus, whose rural parts were equally tribal, the irrigation canal network was much enlarged.