Last year, Guillermo Palmadera, the mayor of a remote area in Peru's Andes, was growing increasingly worried that a harsh dry season could spoil his district's crops of barley, alfalfa and local tubers.
The Andes have an annual dry season between May and September, but farmers in his district of Pamparomas say rains have been particularly sparse in the past couple of years, amid global human-caused climate change that is exacerbating extreme weather patterns.
An extended dry season comes at a high cost. Keeping soil idle for more than half of the year hurts both income and what families can eat.
Palmadera found a solution not with an engineer but with an archaeologist, who was surveying bits of an old stone wall in the high grounds of his district.
Kevin Lane, an archeologist at the University of Buenos Aires, had identified 18 abandoned dams built in Pamparomas before the Spanish colonization of the Americas. Lane proposed refurbishing an old dam.
"The problem of water scarcity is not new in Peru," Lane said.
Water scarcity is so intertwined with Andean history, he added, that he believes water wars were fought there in the past.
"It's very dry, we've had few rains for the past two, three years," said Damian Quiroz, a farmer and father of eight in Pamparonas.
With financial support from Germany's Gerda Henkel Foundation, Lane and local farmers built a 3-meter high dam on top of old remains at 4,600 meters (15,092 feet) above sea level using stones, clay and modern materials such as geotextile.
Those are easy to replace in an area prone to earthquakes and big temperature variations that can crack other materials like concrete.
The rehabilitation cost $100,000, while they estimate that building a concrete dam could have cost $1 million.
With the dam finished, 300 neighbors from the Pamparomas district are waiting for the rainy season to start. They expect to collect 15,000 cubic meters of water.
"We are very impatient," Quiroz said. "With the water we'll feed some cows to make cheese, and guinea pigs for us and hopefully to sell."
(Reporting by Inti Landauro; Editing by Marcelo Rochabrun; Editing by Aurora Ellis)