Puerto Rico Gov. Ricardo Rosselló has placed a definitive bet on wind, water, and sunshine. Last week, he signed a bill, the Public Energy Policy Law of Puerto Rico, to power the island solely by renewable energy by 2050. Along the way, the island must draw 40 percent of its electricity from renewables by 2025 and give up coal by 2028.

We have designed a regulatory framework to transform our energy system to a resilient, reliable and robust one with fair and reasonable rates for all consumers. https://t.co/GGmX3o18fh — Ricardo Rossello (@ricardorossello) April 12, 2019

This puts Puerto Rico in league with more than 90 cities, counties, and states like Hawaii and New Mexico that have set 100 percent clean energy targets. It also gives the territory a head start in bigger, more aggressive climate proposals like the Green New Deal.

“I’m pretty sure that this will be, by leaps and bounds, the quickest transition to renewables that’s ever happened anywhere on the planet,” said P.J. Wilson, president of the Solar and Energy Storage Association of Puerto Rico. “To go from [2] percent today to 40 percent by five years from now will be the biggest challenge the renewable energy industry [in Puerto Rico] has ever faced, on top of a very challenging political situation and a challenging financial situation.”

Indeed, Puerto Rico will be pursuing an aggressive renewable energy target from a fragile position. It currently gets the bulk of its electricity from fossil fuels and its power grid has suffered from years of poor maintenance and neglect. As an island, it’s isolated from a larger power grid, so there are few backup options if energy infrastructure fails.

This was all too apparent in the aftermath of Hurricane Maria, which left the island shrouded in the largest blackout in US history. Emerging from the chaos of the storm, Puerto Rico is now undergoing one of the sharpest and most abrupt changes to its energy system of any part of the United States. There is an opportunity here to build a cleaner and more resilient grid, but the factors that contributed to the mess in the first place remain.

But just as it’s committing to renewables, the Trump administration has been pressuring it to invest in more fossil fuels. Let’s break it down.

All of Puerto Rico’s energy woes converged after Hurricane Maria

The past two years have been brutal for the 3 million Americans living in Puerto Rico.

When Hurricane Maria tore through the island in 2017 with 175 mph winds, it knocked down 80 percent of the utility poles and damaged critical power generators. A delayed and botched response effort subsequently left millions of customers sans power for months. Without electricity, critical medical equipment shut off, food spoiled, drugs became unusable, and sanitation systems went offline, allowing infections to spread. An estimated 2,975 people died in the wake of the storm.

The final portion of Puerto Rico’s devastated grid — an undersea power cable to the island of Culebra — was just reconnected last month, marking 18 months between the time when the storm hit and when power was fully restored.

During the blackout, rumbling gasoline and diesel generators filled much of the electricity shortfall, but renewable energy also found its time to shine. Businesses, hospitals, and some homeowners installed their own solar panels and batteries rather than waiting for repair crews.

But even before the storm, Puerto Rico’s power grid was in dire shape. The Puerto Rico Electric Power Authority, the public utility in charge of the grid, had been struggling financially for years and was effectively bankrupt ahead of Hurricane Maria’s landfall. And the island as a whole has been suffering from a debt crisis.

As a result, PREPA decided not to invoke mutual aid agreements the way Texas and Florida did ahead of Hurricanes Harvey and Irma. These agreements help utilities secure assistance for reconstruction from other utilities after a natural disaster.

PREPA officials said they were worried they would not be able to pay back repair crews. Instead, they opted for a reconstruction bidding process that was rife with allegations of mismanagement and corruption.

That’s a big reason why reconstruction dragged on for so long. Though power has been restored now, many of the repairs are temporary fixes, and the risk of another destructive hurricane and ensuing blackout is growing.

“If we have another Maria again, we will have the same result,” PREPA CEO José Ortiz told House lawmakers last week. “The difference is the response will be a lot quicker.”

That means officials have to quickly figure out a more permanent solution to the energy problems. PREPA needs a business model that works and the power grid needs to stand up to the next storm. All the while, Puerto Rico is still constrained by its finances, and climate change is increasing the risks of future devastation.

Puerto Rico is betting on renewable energy, but it will be expensive

Before Hurricane Maria, Puerto Rico generated just 2 percent of its electricity from renewables. After the storm, some homeowners and businesses began to invest in rooftop solar power and batteries. The number of rooftop solar installations doubled in the months since Maria made landfall.

However, it’s still a long way to 40 percent renewable energy, let alone 100 percent. “I don’t think anybody has a clear answer for exactly how to get there,” Wilson said.

That said, Puerto Rico’s new renewables mandate does remove many of the roadblocks that were blocking small-scale energy projects like rooftop solar. Installers, for example, don’t have to get utility permits for photovoltaic arrays smaller than 25 kilowatts. New rules make it easier for neighborhood-scale renewable projects to connect to the larger power grid. And for larger wind and solar projects that do need regulatory approval, the process has been sped up, from years to months.

The renewables law also adds a net-metering incentive for renewable energy installations up to 5 megawatts. That means if a homeowner or a co-op puts more power on the grid than they use over the course of a year, they can get a rebate from the power company.

Wilson said he expects new renewable energy deployment to split evenly between distributed installations like rooftop solar and utility-scale projects like wind farms.

However, getting the money to pay for it all is still a challenge. Companies are still trying to come up with a rooftop solar business model that would work in Puerto Rico, where homeowners are still trying to recover from storm damage and may not have the credit or cash needed to acquire a photovoltaic array. For larger-scale projects, financing is difficult for a utility and a government that are both effectively bankrupt. Puerto Ricans already pay some of the highest electricity rates in the United States, and power bills take up a larger share of incomes on the island than on the mainland.

Some money for renewables has been earmarked in the post-Maria recovery effort. The Department of Housing and Urban Development allocated about $400 million for solar and energy storage in Puerto Rico, with funds to be disbursed later this year.

The Trump administration would prefer if Puerto Rico used more natural gas

The federal government, however, isn’t as enthusiastic about Puerto Rico’s commitment to renewable energy.

US Department of Energy Assistant Secretary Bruce Walker warned the House Natural Resources Committee last week that Puerto Rico’s aggressive clean energy goals could undermine the stability of its power grid.

“DOE believes increasing natural gas generating capacity in the San Juan area would be one of the single most valuable investment for PREPA’s long-term recovery,” Walker said in his prepared remarks. “However, pursuing this investment may be at odds with the island’s energy policy should the Governor choose to sign the Puerto Rico Energy Public Policy Act.”

He added that investing in a few natural gas power plants rather than thousands of distributed solar and wind energy projects would be more cost-effective, freeing up money for PREPA to perform much-needed repairs and upgrades to the power grid. Some of the funding for these plants could come from recovery aid.

Meanwhile, PREPA is undergoing privatization. The move is expected to boost the utility’s credit rating, helping it gather the money needed to transition toward cleaner energy and a more robust transmission system. However, Puerto Ricans are worried that private management could also lead to even higher utility bills. It would also give outside shareholders a say in where the utility invests, whether in renewables or fossil fuels. Analysts also say that privatization won’t solve the corruption problems like graft and nepotism that have plagued the utility.

“If the currently favored privatization process is limited to transferring a corrupt company in the public sector to a group of corrupt investors in the private sector, we will have achieved absolutely nothing,” Sergio Marxuach, policy director at the Center for a New Economy, told House lawmakers last week.

PREPA has requested $2.5 billion in funding from the Federal Emergency Management Agency to make its power infrastructure more resilient to future disasters. Federal officials expect that Puerto Rico will receive $82 billion over time in disaster recovery funds, but President Trump has complained about the total amount and blamed Puerto Rico for its financial woes. So while Puerto Rico’s government wants to aggressively shift to clean energy, it may not have the biggest say in its own destiny.