Political scandals aren’t the only thing weighing down the Chilean economy these days. Climate change is challenging everything from the country’s wineries to mines to energy supplies. But its very problems could provide opportunities for growth and advancement.

While charges of political corruption have embroiled President Michelle Bachelet’s government amid her efforts to battle inequality, the economy has presented its own challenges as mining investment has dwindled, wineries are facing a drought to equal California’s and energy costs have risen.

Hydroelectric production is down thanks to the eight-year-long drought, and that’s sent Chile’s power costs surging to the highest level in Latin America. Not just vineyards are threatened, as the water available for irrigation dries up, and without access to water, mines are having trouble running their equipment. That’s slowed copper production, bringing further bad news to an already-slowing economy.

Floods from torrential downpours in March did their own damage, shutting down mines that were operating in desert areas and damaging fruit crops as well as causing landslides. However, it’s an ill wind that blows no good, and while these troubles haunt some business leaders and government officials in Chile, others are seeing opportunities in the need for desalinization plants and clean energy production.

Acciona SA, a Spanish company that develops clean air, water and wind projects, is predicting that the need for water in Chile will lead to a strong demand for desalinization projects. Not only Chile’s copper mines are in need of water to function, but its cities need reliable supplies of potable water, and Acciona intends to step into the breach, planning to build desalinization facilities to supply those needs.

Mining companies are being encouraged to foot the bill for desalinization plants, which will enable expansion of their operations—particularly in the Atacama Desert, where the Collahuasi mine has the potential to become the largest mine in the world. The Chilean government is hoping to ensure a supply of clean water to consumers, while making the mining companies provide their own through desalinization projects.

And indeed, the mining companies aren’t standing still. Anglo American Plc has already built a desalinization plant in north central Chile, near its Mantoverde copper mine, while construction has begun on another to the Escondida copper mine—a $3.4 billion joint project of BHP Billiton Ltd. and Rio Tinto Plc.

However, the agricultural sector—not just vineyards, but growers of avocados and lemons as well—doesn’t have the deep pockets to fund desalinization operations. Their very existence is threatened by the drought. They may have to depend on nature to save them, unless another solution emerges.

Acciona, meanwhile, isn’t focused just on desalinization. It has already launched its first wind farm in the country, with more on the way—and it’s not the only one. Foreign investors are looking at the country and seeing opportunities galore, being lured not just from Spain but also from France and the U.S. to build renewable energy production facilities.

In fact, Chile is now the top market for alternative energy in Latin America, and the country’s energy minister is pushing that for all he’s worth. Maximo Pacheco was quoted in reports saying that, since the country imports more than 90% of its oil and gas, energy bills could rise another 30%. In the past five years those costs have already risen 30%, and the government is doing its best to promote renewables as a way to stem those increases. That promotion is paying off; 39% of the power projects in the planning stages as of last November are alternative clean energy projects.

The outlook is bright, no pun intended, since Pacheco said in reports that Chile possesses two of the sunniest places on earth. And the country ranks seventh in renewable energy generation out of the 35 countries from the Organization for Economic Cooperation and Development and G7.

With a middle class that’s rapidly buying more appliances and increasing the demand on electricity, added to the energy needs of the mining sector, it doesn’t look as if the sun will set on Chile’s ambitions any time soon.