VICE News is closely tracking global environmental change. Check out the Tipping Point blog here.
When El Niño last lashed Peru's bone-dry north in 1998, the main plaza in Trujillo, which lies along the coast, flooded and bodies buried in the city's cemetery were disinterred.
Chan Chan — an ancient mud citadel on the coastal city's fringes — was defenseless.
The weather phenomenon triggered by abnormally warm waters in the Pacific Ocean transformed the thousands-year-old temples into pools and the persistent rains eroded the site's ramparts.
But, as El Niño once again gathers momentum, the largest pre-Colombian city in the Americas is better prepared for the heavy lashings of rain that are likely to come.
Last year, the Peruvian government granted the UNESCO world heritage site $615,000 to help shield it against El Niño's wrath.
A team of 90 workers have erected roofs, installed rain gutters, and reinforced adobe walls, the project's director, Henry Gayoso, told VICE News.
"We've worked on eight citadel walls and four temples to prevent their collapse and decay, and cleared drains which remove subterranean water and humidity," said the archaeologist. Workers are combing the 14 square kilometer site for fissures in the searing adobe brick.
In late February, rare seasonal rains tested the defences, with local workers awoken by detectors in the night that signal them to cover the site with plastic sheets.
The metal and plastic protections offer a stark contrast to the radiant, yellow earth, sculpted by the Chimu people around the 9th century and which at its peak housed 100,000 residents.
But erratic swings in climate override aesthetics. El Niño, said Gayoso, is becoming more ferocious due to climate change.
"Before you waited 25 years. Now they repeat every three or four years," the sprightly sixty-something said. "Global warming leads to irregular behavior in temperatures, winds, and climate."
The sudden specter of El Niño triggered the government's effort to safeguard Chan Chan and dozens of other archaeological sites that dot the country's north, Jose Machare at the Geophysical Institute of Peru told VICE News
"It's hard to avoid the reality that El Niño could strike and get out of hand, and so prevention is far better than cure," he said.
Despite two severe events in the last 30 years in 1982-83, and 1997-98 where global damage estimated $35-45 billion, determining the link between El Niño and climate change remains a challenge for scientists.
Tim Stockdale, principal scientist at the European Center for Medium-Range Weather Forecasts told VICE News "no strong evidence or consensus existed" around the impacts of climate change on the frequency and intensity of El Niño.
Scientists have examined fossilized coral from the Pacific Ocean for signs of increasing frequency over millennia. Levels of an oxygen isotope showed warmer, rainier periods consistent with El Niño were stronger during the 20th century than at most periods in the 7,000-year record.
A 2013 study in Nature Climate Change predicted the number of "super El Niños" could double as climate change gathers pace.
For millennia, however, dwellers of the valleys surrounding Trujillo have borne the brunt of the phenomenon.
El Niño's impact on the region's agriculture may have spurred rulers of the Moche civilization, which predated the Chimu, to carry out human sacrifices aimed at appeasing their gods and allay the fears of a restive population.
In 1995, at the nearby Temple of the Moon, archaeologists found 42 skeletons of young men with their throats slit. Today, giant roofs cover the adobe structure and its sacred platforms and murals.
The Incas toppled Chan Chan, the Chimu Kingdom's capital, by cutting off the water supply in 1470.
Managing water here is as key today as it was then.
"In my youth when there was no restoration work, I would climb the walls and walk between the passages," Gayoso said. "The virtuosity of the work of our ancestors left an impression," he told VICE News. "Chan Chan fills me with spirituality - it's magic.
Follow Alex Pashley on Twitter: @A_Pashley