Stuck between the Andes Mountains and the Pacific Ocean, the Atacama Desert is one of the driest places on Earth. But the area’s weird geography means that it will soon be home to a massive hydropower plant–the first step in a new system that could theoretically provide all of South America with 100% renewable energy.

The new plant, called the Mirror of Tarapaca, will generate solar power during the day and use that to suck seawater up a tunnel to a top of a mountain, where the water can be stored in a natural reservoir. At night, the plant will drop the water back down, generating power as it falls.

Unlike solar or wind power on its own, it’s a guaranteed source of energy at any time of the day.

“You need to be able to provide power when it’s needed, so it’s readily available and dispatchable,” says Francisco Torrealba, co-founder of Valhalla, the company building the plant. “If on a particular day you don’t have wind and can’t provide energy at a peak time, that would be a huge crisis. That’s why our concept becomes relevant.”

The coastline of Chile is one of the few places in the world where the design can work. “Chile has the best conditions in the world for solar plants–roughly 15% better than Arizona,” he says. “It’s really stunning. But Chile also has the best conditions in the world for pump storage running with seawater. That means we can produce flat, steady power at a very reasonable price.”

Pumped storage–pumping water up and down, basically the equivalent of a giant battery–is usually used at dams. In Chile, the region’s geography basically creates a natural dam, meaning little construction is necessary other than the tunnels. And that makes the whole system as cheap as coal.

“In Chile, we don’t have any subsidies for renewables, so we need to be able to compete straight with coal generation,” says Torrealba. “It’s a very Darwinian world–you need to be able to play against coal. Our cost structure is at the price of coal right now.”