In the 10th century CE, the Caliphate of Córdoba moved the city of Elche seven km away from "Ilici" to its present location. The Caliphate from the 7th to 10th century expanded the irrigation system into a complicated canal system centered on the Vinalopó river. The rulers applied North African water management techniques to create an oasis in an arid environment. Faced with scarce rainfall, irregular river flow, and brackish water from the Vinalopó river, the Caliphate in the second half of the tenth century planted palm groves. The palm trees prevented soil erosion, decreased water evaporation, provided shade, and protected crops from wind. The Caliphate divided the groves into "huertos" (rectangular base agricultural unit, Spanish for orchard) forming "huertas" (groups of "huertos"). Palm trees were planted in a grid pattern with single or double rows along the rectangular "huerto" edges. The palm trees enhanced agricultural production in an arid region with summer temperatures consistently above 30 °C and annual rainfall below 250 mm (9.8 in). Forage plants, cereals ("i.e.", corn, wheat, barley, alfafa), and medium-sized trees ("i.e.", pomegranates) were planted inside the "huerto" for human and livestock consumption. The palm groves also provided construction material for wood, fibers ("i.e.", baskets, thatched house roofing), and ornamentation. "Huertas" were bounded by "cascabots" (fences of plaited dried palm leaves) or 1–2 m high plastered walls of undressed stone. In addition to agriculture, tenants planted elaborate gardens.