For millenniums, the size of communities was determined by the amount of water readily available, which in desert is limited and inconsistent in quality and flow. To overcome such problems, early in the 1st millennium BC, Persian engineers developed a system called qanat: a series of wells which have the bottom ends connected through a slightly inclined underground aqueduct.

The wells situated near a mountain reach bellow the ground water level and the underground canal prevents evaporation and contamination en route to the community. Other wells are built along the way to be used during construction and maintenance. While some qanats are only 7 km long, some can extend over 70 km.

In Na’in, Mahmood facilitated an underground visit. Through a tunnel we descended to 30 m bellow ground level.

Sometimes, the force of water is used to power mills. This was the case at the place which we were visiting. The mill has been out of commission for at least 30 years but the millstones were still present.
The drinking water is usually stored in egg shaped structures named Ab Anbar. Most of the tank is under ground, to keep the water cool and safe the structure from earthquakes. Additional cooling and ventilation is provided by wind trapping towers. I can assure you that, despite being a very hot day, the water was kept really cold without the use of modern technology.
Other use of the water is for household washing and public baths.
And finally for agriculture, through a network of surface aqueducts and dams.
This is a “fenjaan”, a water clock used since year 500 BC to determine the amount of time each of the families sharing a qanat would be allowed to tap the water source for their own land use. It is a pot with a small hole. When placed on water it will slowly sink and it will be fully submerged after a constant amount of time.
The closer you are from the point where it surfaces, the cleaner and colder the water is, so wealthier people tend to live near that place. From a nearby hilltop, you can easily see the benefits the water brings to agriculture. The green area is the one serviced by the system above.
This Persian invention spread to other arid areas from Morocco to India. There are tens of thousands still in use today, although many more have been left in decay during the past 50 years. The oldest qanat still in use is in Iran and it is 2700 years old.