Puerto Rico’s Gov. Ricardo Rosselló has his eye on the sun.

On Tuesday, in a tense hearing about the the island’s slow recovery, he told lawmakers that the Isla del Sol now wants solar energy to provide as much as a quarter of its electricity, transmitted across microgrids and backed up by batteries.

Before Hurricane Maria swept over the island in September, Puerto Rico received a paltry 2 percent of its electricity from all renewable energy sources.

But since the disaster struck, energy experts, legislators, and solar companies like Tesla have been arguing that Puerto Rico has a tremendous opportunity — a kind of tabula rasa — to rebuild its failed grid to be greener and more resilient.

Now the governor seems to be taking them more seriously.

“I am 100 percent backing renewables,” Rosselló told the Senate Energy and Natural Resources Committee. “This is an opportunity to make microgrids in Puerto Rico so they can be sustained in different areas.”

The island is still shrouded in the longest blackout in US history, and most of the grid repair efforts so far have been to rebuild the old system, which is dependent on fossil fuels. One exception: a children’s hospital in San Juan that was brought back online in October with solar panels and batteries manufactured by Tesla.

Hospital del Niño is first of many solar+storage projects going live. Grateful to support the recovery of Puerto Rico with @ricardorossello pic.twitter.com/JfAu11UBYg — Tesla (@Tesla) October 24, 2017

The project followed direct talks in October between Tesla CEO Elon Musk and Rosselló on restoring power to Puerto Rico with solar.

Entrepreneurs, lawmakers, and activists want more of these small, closed-loop transmission systems called microgrids that are backed up with batteries to keep the power on all night. A Puerto Rico transformed into an archipelago of microgrids would also in theory better stand up to storms and provide cheaper energy.

Companies like Tesla, Duracell, and the German energy storage firm Sonnen are already sending battery and solar supplies to Puerto Rico, building a toehold in what may be a lucrative rebuilding project. Solar power companies like SunRun and Vivint Solar are also joining the relief effort, pledging to bring hardware to the US territory.

Environmental activists have praised these proposals.

Tesla shipping 100s of Powerwall batteries to Puerto Rico. That's going to help https://t.co/8MYSs8bEFB — Bill McKibben (@billmckibben) October 1, 2017

But Puerto Rico’s energy problems run deep. Long before Hurricane Maria ripped into Puerto Rico on September 20, it was clear that one of the island’s greatest vulnerabilities was its decrepit, sagging power system almost entirely dependent on fossil fuels. Under the brute force of the Category 4 storm, the aging and poorly maintained power plants and transmission lines sustained such significant damage that nearly a month later, power has only been restored to 26 percent of the island.

There’s no doubt that the technology to reliably power most of Puerto Rico with distributed renewables exists.

But refashioning Puerto Rico’s grid is not a question of technology. Rather, the dire state of the territory’s finances poses a significant obstacle to new investment in its energy infrastructure. And expensive missteps, like the canceled $300 million grid repair contract with Whitefish Energy Holdings, are certainly not helping.

Ultimately, building a greener, more resilient, independent grid rests on whether there is enough money and political will to see the vision through.

Puerto Rico’s energy woes predate Maria and go beyond the grid

The storm’s sweeping blow to the power grid hasn’t just been inconvenient — it’s been deadly. The official death toll from the storm is 51, though the actual number is very likely in the hundreds, as we’ve reported. And some of those deaths occurred because the power outages kept people from getting essential medical treatment like dialysis.

Though this brutal aftermath of the storm has brought the weaknesses of Puerto Rico’s power sector into sharp relief, it was creaking long before Hurricane Maria struck and even before the island’s financial downturn.

As Vox’s Alexia Fernández Campbell explained, as tax breaks faded, businesses left the island, and so did workers and utility customers, eating into the revenue of the Puerto Rico Electric Power Authority, the unregulated utility monopoly.

The utility spiraled in debt and barely kept up with maintaining the power grid, let alone modernizing Puerto Rico’s energy system, as outlined in a 2016 assessment commissioned by the Puerto Rico Energy Commission.

“PREPA’s fundamental infrastructure is in jeopardy due to a lack of funding and significant workforce reductions,” according to the report. “PREPA’s generation, transmission, and distribution systems are falling apart and reliability is suffering.”

Judith Enck, who until January ran EPA’s Region II, which includes Puerto Rico, said the utility also failed to make upgrades when times were good, content with its monopoly status.

“This predated the financial collapse in Puerto Rico. The fundamental problem is PREPA,” Enck said. “I met regularly with the utility in Puerto Rico and encouraged them to invest in energy efficiency and renewables, but there was tremendous resistance.”

Despite ample wind and sun, some of the highest electricity prices in the country, and the steep cost decline in renewable energy technologies, Puerto Rico has fallen far behind other US regions in renewable energy investment, forming barely 2 percent of its generation mix.

Alaska, by contrast, gets close to 4 percent of its electricity from renewables, excluding hydropower.

“Fossil fuel companies are very powerful economic interests,” said Ruth Santiago, an attorney in Puerto Rico working on environmental issues. “They often control public policy in terms of energy generation.”

Puerto Rico gets much of its electricity from large central power plants on the southern coast of the island and transmits power to load centers on its north side, as you can see on this map of the island’s transmission system.

Imported fossil fuels provide the bulk of power fuel, with 47 percent of the island’s electricity coming from petroleum, 34 percent from natural gas, 17 percent from coal, and just 2 percent from renewable energy in 2016, according to the Energy Information Administration.

In 2015, nearly 72 percent of Puerto Rico’s electricity came from petroleum.

“In terms of power sources, they decided to keep these really old dinosaur power plants operating,” Enck said.

Brandon Hurlbut, former chief of staff at the US Department of Energy who served on President Barack Obama’s Puerto Rico task force, agreed, noting that PREPA had a captive market and faced no regulations until recently, so they had no incentive to try new things.

“There was no oversight,” he said. “The people that were running the utility, they just had no concept of innovation.”

Yet to many people outside the island, the destruction to such a beleaguered power system appears to be an opportunity to rebuild better and cleaner. “The only silver lining, if there is one, is that they have an opportunity to completely change how they generate and distribute electricity on the island,” said Enck.

Solar, batteries, and microgrids do improve resiliency

A radical turn toward renewables in Puerto Rico aligns with Musk’s vision for an America where electric cars, home batteries, and solar panels are all synergized. With electric automaker Tesla’s acquisition of solar installer SolarCity, Musk took a step toward his goal of “productizing a microgrid.”

That is, developing a complete standardized drop-in energy system, from the generator (solar) to the arbitrage (batteries) to the network (microgrid) to the users (electric cars and homes).

Tesla representatives declined to comment further about the company’s plans for Puerto Rico and deferred to Musk’s comments on Twitter.

Puerto Rico provides a chance to test this idea and see whether it would actually bear fruit.

And shifting away from big, centralized power plants and large power grids toward smaller distributed systems does confer some advantages when it comes to standing up to storms and rebuilding after.

“Microgrids definitely do have the ability to weather extreme events,” said Kevin Schneider, a principal engineer at Pacific Northwest National Laboratory. “Microgrids give you the benefit that the power doesn’t have to come from a remote location. That tends to minimize your exposure to events.”

Keeping your power source close to you (like on your roof, as is the case with solar) means the power is less likely to go out when a tree falls on a power line. One Puerto Rican farmer, for example, managed to restore power with the solar panels he installed before the storm.

When the water recedes, a smaller grid, like one spanning a neighborhood or a campus, is easier to resuscitate.

There is less hardware that needs repair, and the responsibility for the grid often falls to the people that are on it, creating strong incentive to maintain infrastructure and get it back up quickly compared to a large, central utility which has to weigh the needs of all of its customers.

“Owners of microgrids would have paid better attention to them than the Puerto Rican utility had done,” said James Kirtley, a professor of electrical engineering at MIT.

A smaller grid powered by local generators is also quicker to install. Some individual buildings in Puerto Rico like fire stations have already installed new solar arrays with the help of nonprofits.

Other islands, like Richard Branson’s Necker Island, have de facto microgrids, and many have deployed renewables. But rebuilding energy infrastructure with distributed power in Puerto Rico, with 3.4 million residents, would require deploying these systems at an unprecedented scale.

Puerto Rico’s energy system currently routes electricity over long distances, which creates choke points for power, and the responsibility for these power lines that traverse the sparsely populated parts of the island fall to PREPA.

The fact that energy-hungry cities like San Juan are so far away from the generators that power them means that workers will have to rebuild miles and miles of transmission lines through mountains with limited roads before power comes back, even though most generators survived the storm intact.

This is a massive construction effort and will require new hardware shipped to the island, which is part of why power restoration will take months. And many of the utility workers with intimate knowledge of Puerto Rico’s grid have left the island, part of an exodus of more than 300,000 residents between 2000 and 2016.

“I think there is a generalized sense that the system we have now is not working,” said Santiago, speaking from the city of Salinas on the southern coast of Puerto Rico. “There is no doubt that the impacts of Hurricane Maria have made it very clear that making plants send power to San Juan is not a good system.”

Revamping the grid will cost Puerto Rico dearly. And no one seems to have a plan to pay for it.

Battery-backed microgrids are predicted to attract $22.3 billion in investment over the next 10 years, spurred in part by the outages after recent storms.

But switching to a distributed grid dominated by renewables and energy storage systems won’t make Puerto Rico invincible to storms, and they also introduce their own problems.

The biggest issue is cost.

“We can build power systems that are almost 100 percent reliable but they are not going to be cost-effective,” said Schneider.

Moving power lines underground, for example, can triple the cost of transmission, and it only trades the risk of wind damage for the risk of flood damage, conferring little advantage in coastal areas.

And power grids, like those that span continents, reap the benefits of building and buying in bulk. A large, interconnected power grid lets utilities buy and sell power so that even when gigawatts of generation go offline, like when a nuclear reactor shuts down for refueling, the lights stay on.

Research has shown that deploying renewable energy over a vast area connected by a transmission system would actually increase reliability and reduce intermittency compared to smaller networks since it would route power from areas where there is sunlight and wind to areas where there isn’t.

Shrinking the grid means that losing smaller generation sources has a larger impact on reliability. A homeowner in Texas could still buy power from the grid if her solar panels blew off in a storm, but on a solar microgrid in Puerto Rico it could mean lights out until the panels are replaced.

Maria, which struck Puerto Rico with 150 mph winds that knocked down trees and power lines, easily ripped many solar panels off their moorings.

That means massive hurricanes will almost always disable grids for a period of time.

Even if your home’s solar panels survive the storm, you may not be allowed to use them. Florida homeowners found out about this the hard way after Hurricane Irma, where the utility told residents with rooftop solar systems that they couldn’t draw power from their panels while workers were restoring power due to the risks of sending errant electricity on the grid.

And a microgrid still has to perform functions like frequency regulation, voltage stepping, and power routing between generators, storage, and electricity users. The relative costs of these services go up as they are distributed among fewer people.

“The challenge is you have to do everything a larger power system can do,” Schneider said. “It’s an economy of scale thing in the opposite direction.”

Meanwhile, Tesla estimates that providing one day of power during an outage for an 1,100-square-foot home using 24 kilowatt-hours of energy would require two of its battery Powerwalls with an equipment cost of $11,700, not including permits, necessary electrical upgrades, and grid interconnection fees.

MIT’s Kirtley noted that remote microgrids that aren’t connected to a larger main grid would also require overbuilt generation and energy storage even during normal operations, since they can’t get backup power from another central power plant.

“You are going to be using more electricity at night than daytime, and it has to be sized in such a way to run if you have several cloudy days in a row,” he said.

This is too expensive for many homeowners in Puerto Rico — and for a utility that’s billions in debt and missing bill payments. There are few banks that will lend PREPA the cash they need to start building this kind of system for more than 1.5 million customers.

And Elon Musk is running a business, not a charity, so coming up with a way to generate money from reconstructing Puerto Rico’s energy system will be crucial for private companies to step in, which will be difficult as the island copes with its financial struggles.

“The business case is always a really tough one,” Schneider said.

All the while, Puerto Ricans don’t have the luxury of waiting for the grid of the future, so renewable energy entrepreneurs must compete against fossil fuel generators. Already, new diesel turbines are being installed on the island.

The post-Maria Puerto Rico is hard to plan for

The Puerto Rican government is facing intense pressure to restore power quickly. Gov. Rosselló laid out a timeline for restoring power to 95 percent of the island by Christmas.

Musk hinted at the challenge that lies ahead:

The Tesla team has done this for many smaller islands around the world, but there is no scalability limit, so it can be done for Puerto Rico too. Such a decision would be in the hands of the PR govt, PUC, any commercial stakeholders and, most importantly, the people of PR. — Elon Musk (@elonmusk) October 5, 2017

Meanwhile, it’s clear that Hurricane Maria will permanently reshape Puerto Rico’s economy and population.

Many people have fled and upward of 200,000 people may not return, speeding up an ongoing migration trend.

This poses a huge challenge for energy planners. Utility grids in particular cost billions of dollars up front and take decades to pay back, but the situation in Puerto Rico presents a moving target and makes it difficult to plan.

The Trump administration has also shown a questionable commitment to recovery in Puerto Rico, with the president threatening on October 12 to withdraw FEMA and military responders. But Trump also broached forgiving Puerto Rico’s debt.

That means the default solution — rebuilding the island’s electrical grid the way it was — may end up becoming the likeliest scenario.

For now, the US Army Corps of Engineers is concentrating its power restoration work across four fronts: providing emergency power, getting existing power plants up to speed, rebuilding power transmission lines, and repairing distribution systems.

One key opportunity is FEMA’s Sheltering and Temporary Essential Power program, which aims to provide electricity to individual homes after a disaster. Rather than just using gasoline or diesel generators, the program for the first time is installing battery packs and rooftop solar panels on homes that don’t have electricity.

“We expect that there will be 80,000 homes that will be introduced in the STEP program,” Rosselló said. “Think about what that means if half of them decide to go with the renewable-battery pack route. It means you now have the starting conditions to think about things like having a virtual power plant in Puerto Rico.”

PREPA executive director Ricardo Ramos meanwhile was optimistic that Puerto Rico could hit Rosselló’s target of getting electricity back to 95 percent of utility customers before the end of the year. “It is a hard deadline,” he said. “We believe we can reach it.”

Correction: A previous version of this story stated that a 2016 energy assessment of Puerto Rico was commissioned by PREPA. In fact, it was commissioned by the Puerto Rico Energy Commission, PREPA’s regulator.