The Kingdom of Morocco is accustomed to dealing with water scarcity: the rock and sand of the Sahara Desert account for at least 40% of its surface area. But seven consecutive years of drought, which began in 02018, put even this North African nation’s resilience to the test. In 02024, the wheat harvest plunged by half. At the height of the drought, the hammams, the centuries-old steam baths of Marrakech, had to be turned off. King Mohammed VI called for a ban on lamb sacrifices during the festival of Eid al-Adha, because the lack of water behind the massive Al Massira Dam meant there wasn’t enough livestock to spare for religious purposes. Only the long-overdue return of the rains in the winter of 02025–26, which partially recharged parched aquifers, prevented catastrophe.

One high-tech strategy for coping with water scarcity is to make seawater drinkable. Morocco has invested heavily in desalination plants; Coxabengoa, a Spanish company, was called in to build the largest desalination plant in commercial operation in Africa, near the coastal city of Agadir. The facility, which cost billions of euros to build, requires extravagant amounts of electricity, plays havoc with fisheries and marine ecosystems as hypersaline wastewater is dumped offshore, and meets less than one-hundredth of the nation’s annual water needs. Other plants are under construction, but they will be exclusively used to supply drinking water for city-dwellers. Desalination isn’t a solution for the farmers who provide the vast majority of Morocco’s food.

Dale Lightfoot, an Oklahoma State University geographer, believes that one answer to the crisis that faces Morocco — as well as dozens of other nations in the world’s arid zones — is hidden underfoot. While roaming the palm-tree-dotted Tafilalt oasis in southeastern Morocco in 01992, Lightfoot kept encountering piles of dirt and debris, which at first glance resembled the hardened mounds of soil left behind by colonies of ants and termites. Each pile concealed the opening to a vertical well shaft, which led to an underground tunnel the local Berber people referred to as a khettara. Lightfoot realized that these chains of wells, some of which stretched for dozens of miles, led to reservoirs and irrigation canals that supplied villages with water, and kept the oases in the desert green with date palms, fig, almond, and olive trees.

Khettaras near Erfoud, Morocco. Photo by Bernard Gagnon (CC BY-SA 3.0)

In his subsequent work, Lightfoot discovered that khettaras weren’t limited to Morocco. He has traveled through 20 countries in search of similar structures, which are generically known as qanats, from an Akkadian word meaning “reed.” In his book Qanat: Stream of Wells (02024), Lightfoot has inventoried 90,000 qanats, from Peru to Uzbekistan, 46,000 of which still provide water today. The oldest of them have been operating continuously for 2,300 years. Some feed freshwater pools where trout and other fish are farmed; others operate mills that grind grain. While most are found in rural settings, Lightfoot was astonished to discover that, as late as the 20th century, qanats guaranteed much of the municipal water supply of such capital cities as Lima, Madrid, and Tehran. Even today, as much as half of the irrigated land in Iran is supplied by water from qanats, some of which extend for 50 miles and channel water 1,150 feet beneath the surface. 

The principle behind the qanat is simple. A horizontal tunnel, up to ten feet in height and four feet in width, is dug by hand through bedrock or subsoil, until it reaches a vertical “mother well,” which has been sunk into an aquifer. At regular intervals, smaller well shafts are dug from the surface to provide light and ventilation. Though the site has to be chosen with care, a qanat can be dug anywhere the water table is higher than the farms or settlements to be irrigated. Water from the saturated soil naturally collects in the tunnel. The slope is engineered with exacting care: if it’s too great, the flowing water will erode the tunnel floor; if the gradient is too slight, sediment will build up, blocking the flow. Built correctly, though, a well-maintained qanat can provide a reliable stream of fresh water for centuries.

“Qanats flow continuously yet do not diminish the aquifer,” notes Lightfoot. “They offer a low-cost, practical solution to the problems of water supply, especially in arid regions with high evaporation rates, because water in a qanat is channeled underground and evaporation is much reduced compared to water flowing in surface canals.”

The beauty of the qanat is the way it sustainably taps the aquifer, which is naturally recharged by rainwater, without overtaxing groundwater. That’s not the case with diesel-powered pump wells, which are widely used in Africa and Asia. Like a vertical straw plunged into an aquifer, a pump well can exhaust “fossil” water — which has accumulated over millennia — in a matter of months. Some Moroccan farmers use pump wells to satisfy the demand for watermelons, as well as water-hungry argan trees, which supply the oil that goes into sought-after cosmetics. This has provoked a literal race to the bottom: once groundwater has been sucked dry, the land becomes useless for agriculture. The use of pump wells for short-term profits is accelerating an exodus to Morocco’s cities, which in turn undermines the stability of rural communities. 

Qanats were once thought to have originated in ancient Persia, around 03200 BCE, and spread by diffusion to Egypt and Libya, to be adopted by the Romans. From there, according to this theory, Spanish conquistadors brought them to Mexico and South America. Lightfoot, however, points to new evidence that the oldest qanats can in fact be found in the United Arab Emirates and Oman, and considers it likely that equivalent structures were invented independently in Han Dynasty China and pre-conquest Peru. 

He has even found evidence that a kind of qanat system was built in medieval Tuscany. In the 01330s, Giacomo di Vanni Ugolini and his son led a group of laborers, using mallets, chisels, and shovels to dig a lateral tunnel through soft tufa to channel water from the aquifer to the hilltop town of Siena. They reinforced vertical shafts with brick arches, piers, and wall casings, and the water was distributed through siphons to the public water fountains for which the town is still famous.

“Qanats are everywhere, but seemingly nowhere,” marvels Lightfoot. “Practically invisible, yet dependable, they make life possible in impossible places.” And yet, in the era of diesel pump wells, desalination plants, and mega-dams, they are considered an ancient technology with no realistic role in modern water conservation strategies.

Even in Morocco, a nation that promotes its commitment to solar, wind, and other green technologies, there is little concrete support for communities trying to keep their khettaras functioning. The khettaras are officially protected — under Moroccan law, it is now illegal to destroy or damage an existing khettara — but in most villages, the money to maintain the tunnels and keep the water flowing comes from private contributions from local residents. Morocco has made an official request to inscribe them on UNESCO’s prestigious Intangible Cultural Heritage list, and tours are organized to non-functional khettaras around Marrakech.

When Emily Hayes-Rich, an archaeologist at the University of New Mexico, decided to follow in Lightfoot’s footsteps, she discovered that not only were hundreds of Morocco’s khettaras still being actively used and maintained, but, in some villages, new ones were actually being built.

A page from Los Angeles: City & County (01897) describes the zanjas, or acequias, that irrigated the lawns of the city.

Growing up in New Mexico, Hayes-Rich played and swam in acequias, a community-operated canal system originally built by Indigenous Pueblo people and Spanish settlers. As the recipient of a Fulbright research grant, she was excited to explore what seemed like a similar system in North Africa. She started by using Google Earth to pinpoint the telltale signature of the khettaras in the Anti-Atlas Mountains in western Morocco on satellite maps: rows of dots, each corresponding to a well-shaft, that terminated in the green oases where crops were raised. Using social media, she reached out to Shilha-speaking Berbers in villages such as Imi N’Tizghet, who agreed to guide her through local khettaras in exchange for a complete map of their irrigation systems.

While doing fieldwork, Hayes-Rich says she visited close to 100 oases in the southwestern Sahara. “Someone would say, ‘My cousin down the road also has a khettara, but it’s concreted over, so you can’t see it from satellite imagery,’” she recalls. “Through word of mouth, I was able to add 500 khettaras to the inventory.” 

Hayes-Rich reckons Morocco has 2,400 khettaras, which would make the nation home to one of the world’s densest concentrations of qanats. Some historians date their construction to 01078, when a technician from Arab-Andalusian Spain built a khettara in Marrakech, though others trace their arrival farther back, to the Roman occupation of North Africa. 

“A common misconception is that these technologies were only built in antiquity,” says Hayes-Rich, “and communities have been simply maintaining them.” She visited villages in the remote Ameln Valley, in the Anti-Atlas Mountains, where community groups were upgrading existing khettaras by reinforcing the ventilation shafts with concrete. In other regions, sections have been excavated, reinforced with a concrete skeleton to prevent erosion, and reburied. She believes that 350 khettaras remain in active use throughout Morocco.

“So many agricultural officials I spoke to, at the level of the regional or national government, said khettaras were mostly abandoned, or relics of the past,” Hayes-Rich says. “I think that because the systems are managed at the level of the community, they are often disregarded.” 

According to Abdennabi El Mandour, a professor of hydrology and the current director of the Mohammed VI Museum for the Civilization of Water in Marrakech, the Moroccan state is committed to protecting khettaras, but regional agricultural offices prefer to offer financial support to small farmers for technological solutions, rather than extending or restoring khettara wells and tunnels. He points out that because in so many places the water table has been lowered to irrigate large-scale industrial farms, the khettaras no longer work in years of drought.

“For these khettaras to function, there has to be rainfall, there has to be snow in the mountains,” El Mandour says. “The khettaras depend more on the changing climate than other systems.” The state, he explains, favors reimbursing small farmers who decide to install modern drip irrigation systems, which continue to work, by way of pumped groundwater, even in drought years. But because the pumps lower the water table, they undermine the viability of the traditional, and sustainable, khettaras. “We definitely need to give khettaras more importance,” acknowledges El Mandour, “and the agricultural offices have to work more closely with local communities to maintain this ancestral system in the oases.”

In the long term, traditional systems are a great investment. As Lightfoot has observed, qanats are typically five times cheaper to operate than a pumped well. The problem, though, is that building and maintaining them is labor-intensive. He estimates that, even using pick-axes and shovels, it might cost $1 million to build a five-mile-long tunnel with an average depth of 45 feet. The long-term benefits, though, are significant. “A qanat can be maintained for centuries,” Lightfoot says, “and with a low cost of water delivered once the system is complete, the initial investment is recouped after about 30 years.”

Irrigation cisterns (sharij) at Figuig date palm oasis in Morocco (01913)

For Hayes-Rich, Morocco’s khettaras represent not just an ecologically balanced approach to agriculture and water management, but also foster a richly rooted social system. To engineer a qanat calls for expertise, often handed down from father to son, and a large local workforce to undertake digging and maintenance. Making sure everyone gets an equitable share of water calls for discussion and cooperation, which builds social bonds and community over generations. That’s why when the owners of large farms sink diesel pump wells to raise watermelons, bananas, and oranges for quick profits, they drain ancient stocks of groundwater, making agriculture impossible, in turn accelerating the migration of young people from villages to big cities.

The problem with khettaras is that, as a technology, they aren’t particularly sexy. In the 01960s, Hassan II, the father of the current king, launched a frenzy of megadam construction; the goal was to “make a million acres of desert arable,” and ensure that not a single drop of water that could be used for agriculture reached the ocean. Dams helped green the north of the country, but didn’t benefit the arid southwest, where people continued to quietly rely on the water flowing in tunnels under their feet.

Since the beginning of the 21st century, the incidence of droughts around the world has increased by 29%. As global temperatures rise, mountain glaciers that once reliably fed such rivers as the Ganges, Yellow, Rhône, and Mekong are retreating. In the last decade, Jakarta, Mexico City, São Paulo, Chennai, Tehran, Cairo, and other megacities have all faced their version of Day Zero — the time when their municipal reservoirs run completely dry. As droughts worsen, we’re going to need all the tools available to us to face the challenge of water scarcity.

For Hayes-Rich, Morocco’s khettaras are an example of a smart solution that’s hidden in plain sight. “Around the world, qanats aren’t a dying technology,” she says. “It’s so important for governments and organizations that manage water to know how many people still use, and still want to use, these traditional methods of irrigation.”

💡
TARAS GRESCOE is the author of eight books, including The Lost Supper: Searching for the Future of Food in the Flavors of the Past (Greystone, 02023). He writes about urbanism, transport, and infrastructure in his weekly newsletter www.highspeed.blog