“Running water would change everything,” says Luz Caballero wearily as she stirs a huge pot of beans in the Santa Maria People’s Restaurant in Villa El Salvador, a sprawling, dusty shantytown on Lima’s southern outskirts. “Living without it is just too hard.”

Ms Caballero and the other locals take it in turns to staff the co-operative restaurant, serving up 100 cheap but filling lunches every day. If cooking on this scale seems complicated, then doing so without tapwater takes on an epic quality, with a continuous time-consuming, energy-sapping shuttling of buckets from the plastic barrels in the street outside.

Ms Caballero and her neighbours are among roughly 1.2 million residents of the Peruvian capital without running water. They rely on unregulated private water trucks, which charge up to 30 soles (£6.70) per cubic metre – 20 times what more affluent Peruvians pay for their tapwater – and frequently leave their customers waiting desperately. The new mayor wants to end this exploitation, but she faces immense challenges in a city where climate change has put water sources high in the Andes under unprecedented pressure.

Lima receives less than a third of an inch of precipitation a year and relies entirely on Andean rainfall and glacier melt, both in serious long-term decline. The Rímac, the largest of the three rivers that feeds the capital, has seen its low season flow fall more than 20 per cent in recent years. Satellite photos of the Eulalia Glacier, which feeds into the Rímac, show it to have shrunk dramatically just in the last decade, due, scientists say, to global warming.

With a population of 8.4 million, Lima is the world’s second largest desert city after Cairo. However, while the Nile flows at a rate of 2,830 cubic metres per second, the Rímac averages just 29 cubic metres per second.

Sandwiched between the Pacific and the Andes, Lima is trapped in a thermal inversion, making its climate unusually stable and almost entirely preventing rain. The watershed around Marcapomacocha, a system of high-altitude lagoons that supplies Lima with almost half its water through a trans-Andean tunnel, has also seen annual precipitation fall by 148mm per decade since it became operative in the 1960s. On current trends, Marcapomacocha could receive no rain at all by the middle of this century. Scientists are researching whether the fall is due to a natural, regional cycle or global climate change.

Peru, with its mountains and rainforest, is actually well-endowed with hydrological resources. But 98 per cent of the Andes’ run-off, including the source of the Amazon river, flows east into the sparsely populated Amazon basin, while two-thirds of Peru’s 30 million inhabitants live on the arid Pacific coast.

“This mismatch began 500 years ago with the arrival of the Spaniards,” says José Salazar, president of the country’s urban water regulator, Sunass, noting how the Incas and other pre-Columbian civilisations located their urban centres near water sources in the Andes. To be closer to Spain the conquistadors established their capital on the coast: “Today, we are picking up the bill for this colonial legacy.”

Many of Lima’s poorest residents have now repeated that error by squatting on barren, unstable hills on the city’s fringes. The cost of installing pipes and pumping water to their remote, ramshackle homes is often many times higher than in more developed neighbourhoods. Mr Salazar added: “Now the people are there, you can’t kick them out, and somehow you have to deal with giving them water.”

Villa El Salvador began as a small-scale land invasion in 1971. After receiving generations of immigrants from the highlands, including refugees from the civil war in the 1980s and 1990s, it is now home to 400,000, many living on the flanks of enormous, shifting sand dunes.

Lima’s mayor, Susana Villarán, a former human rights advocate who took office in January, has promised to bring running water and sewerage to all Lima households by 2014. But to achieve that goal, wealthier residents will be expected to half their own consumption from the current wasteful 245 litres per day.

The municipality’s plans include promoting more efficient toilets and showers, increased metering, scaled tariffs that will see the rich subsidise the poor, reducing the 39 per cent leakage rate by upgrading outdated mains, and reusing waste water, including for irrigating parks.

In the Santa Maria People’s Restaurant, they are not holding their breath. Asked about Ms Villarán’s plans, Ms Caballero shrugs her shoulders and says: “They’ve been promising us water for years. We’ll believe it when we see it.”

A vanishing water source

* Peru is expected to be the third-worst affected country by climate change, after Honduras and Bangladesh, according to the University of East Anglia’s Tyndall Centre for Climate Change Research. Its unusual topography, with most Peruvians living on the desert coast but reliant on Andean precipitation, also make it South America’s most water-stressed nation. Global warming has already seen the surface area of Peru’s glaciers shrink by an estimated 30 per cent in the last three decades. In southern Peru, Quelccaya, the world’s largest tropical glacier, is now retreating at 60m a year, so fast that it is actually possible to watch it drip away over the course of a few hours. The melting line has actually now risen above Quelccaya, says Professor Lonnie Thompson, of Ohio State University’s School of Earth Sciences: “It is now just a question of time, how long will it take to disappear?”