Chile has little in the way of fossil fuels, leading it to rely on imports and making electricity extremely expensive.

According to Bloomberg, in 24 of the last 30 years, the country’s energy prices were higher than the world average; at its peak in 2011, the price per kilowatt-hour reached $150.90, almost double the global average.

In 2013, Chile passed a law mandating that 20% of its energy come from renewable sources by 2025, leading to a surge in renewable energy projects.

While the popularity of wind and solar energy has increased globally as costs have fallen, Chile in particular has geography on its side.

Atacama is the world’s driest desert and receives more solar radiation than almost any other spot on Earth. Strong winds blowing in from the Pacific coast and the Andes Mountains also make it ideal for wind power.

Much of the new renewable capacity is being used by the mining industry.

Mines represent about a third of Chile’s overall power usage, and electricity and fuel costs combined to make up 11% of total mining costs for the country’s 21 largest mines in 2017.

With prices for solar energy falling more than 60% from 2014 through the first half of this year, many mining operations see investing in renewables as a way to lower their energy bills.

Some, including state-owned copper producer Codelco, have invested in their own solar and wind projects.

More commonly, producers have signed power-purchase agreements with third-party renewable energy companies, whose plants are sometimes hundreds of kilometers away.

Until November of last year, Chile had separate power grids for its northern and its more populous central regions, leaving most of the country’s population cut off from the renewable energy resources enjoyed by the mining companies.

A massive government project to connect the two grids, begun in 2015, now gives broad access to Atacama’s wind and solar energy, more of which is being pumped into the grid as transmission lines are completed.

By the end of 2017, Chile was producing 14% of its electricity from solar and wind sources and this year set a new target of 70% renewable by 2050.

The massive solar arrays and scattered wind turbines built into the desert landscape are striking, surely, but with climate change looming, they are also an investment in the nation’s future.