(Bloomberg) -- A longtime bakery owner in central Puerto Rico, Miriam Sierra never imagined she’d also become one of her town’s largest electricity suppliers. 

But on a recent weekday, the 51 solar panels on her roof in the small town of Castañer were feeding a bank of industrial batteries and inverters inside a beauty salon across the street. From there, the electricity was flowing to the US Post Office, an ice cream parlor, a private residence and an electric vehicle charger. 

A microgrid is a network of businesses or homes or both, usually in a tight geographic area, that creates power locally and can function independently from the larger grid. In the case of Castañer, the network runs on 121 solar panels spread across three rooftops, as well as the batteries. 

When the power goes out in Castañer — which can happen three or four times a week — properties connected to the microgrid become a lifeline for the town of 6,000. During one recent blackout, a man ran an extension cord from his solar-powered restaurant to his neighbor’s oxygen machine. The owner of the ice cream parlor keeps a power strip on his porch so locals can charge their phones. 

Before the microgrid went into service in May, constant outages and voltage fluctuations forced Sierra to repair or replace her industrial coolers two to three times a year, she says. She’s thrown away more bread dough and rotten food than she can remember. 

“Do you believe in a merciful God?” Sierra, 53, asked. “That’s the only explanation I have for how we’ve stayed in business all these years.” 

Read More: Rooftop Solar Accelerates Puerto Rico’s Shift to Clean Energy

Puerto Rico, a US territory of 3.2 million people, has some of the most expensive and least reliable electricity of anywhere in the country. Hurricane Maria in 2017 decimated its already fragile power grid, leaving parts of the island in the dark for almost a year. Castañer went without power for eight months. Luma Energy, a US-Canadian consortium, took over grid management from the bankrupt public power company last year, but frequent outages are still a fact of life. 

There are a handful of community microgrid projects dotting the island, including Casa Pueblo in nearby Adjuntas and Toro Negro in Ciales. But the Castañer microgrid is the only one confirmed to be tied to the public utility, according to Luma Energy.

An experiment in producing resilient, renewable and cost-efficient energy, it’s likely to become a model for others: The federal government has earmarked $1.3 billion in Community Development Block Grant Disaster Recovery funds to develop more microgrids across Puerto Rico, including for San Juan’s hospital and medical district and for the far-flung islands of Culebra and Vieques. 

Building out the microgrid is Cooperativa Hidroeléctrica de la Montaña (the Hydroelectric Cooperative of the Mountain). It provides the solar panels and batteries for free and users like Sierra pay a fixed rate for the service. “What hammers these businesses that are operating on margins of 5 or 10% is energy costs and fuel surcharges,” said CP Smith, the co-op’s executive director. “By providing a flat fee, we eliminate those risks.”

Sierra used to pay more than $1,000 a month for electricity; now she plays a flat fee of $771. The payments from Sierra and the other beneficiaries of the project will cover the cost of the equipment, operation and management of the system for 20 years, battery replacement in a decade and insurance. 

Puerto Rico’s power woes have made the island a petri dish for survival strategies. As electricity costs have soared and grid breakdowns continue, the use of solar panels, battery backups and generators has exploded. But the shift threatens to leave behind poor communities like Castañer that don’t have the resources to generate their own power, says Smith. (The White House recently asked Congress to appropriate $3 billion for grants to low-income households in Puerto Rico to install solar and battery systems.) 

Read More: Puerto Rico’s Fragile Grid to Get Boost From Networked Batteries

The organization tapped a new law to became the island’s first energy co-op, giving it access to funds and financing that its individual members might not qualify for. 

“The energy cooperative creates a legal counterparty that sidesteps the whole creditworthiness of these businesses,” Smith said, opening a route “to provide projects that are capital intensive, with many stakeholders, with a long-lasting value and bring those to low-income communities.” 

On the US mainland, most utilities are interconnected, so when a power plant fails in Georgia, juice can be pumped in from South Carolina. But Puerto Rico — which sits more than 1,000 miles from Key West — has to fend for itself.

In April, when a fire broke out at a single substation, it knocked out power to the entire island. In September, Hurricane Fiona clipped the southwestern tip of the territory and the grid went dark again.

Microgrids not only add a layer of redundancy to the system but are an effective way to pull in more renewable energy — critical if Puerto Rico hopes to hit its goal of using 100% green energy by 2050, said Shay Bahramirad, Luma Energy’s senior vice president of engineering, asset management and capital programs. 

“This is all about enabling renewables and creating resiliency,” she said. “So we are quite excited about the growth of third-party microgrids in Puerto Rico.” 

The Castañer initiative is still facing growing pains. When Fiona hit, causing the island-wide blackout, the cooperative didn’t realize that an out-of-towner had plugged their Tesla into the free EV charging station, depleting the town’s batteries. The lack of sunlight for a few days after the storm meant the system went dark. 

Even so, the cooperative recently inaugurated a second microgrid in Castañer and has two more in the works. It also has larger ambitions.

Just a few miles away from Castañer is the Dos Bocas Hydroelectric dam. Built in 1942, the 15-megawatt plant has fallen into disrepair and doesn't produce at full capacity. In 2019, the cooperative participated in public bidding to repair and manage Dos Bocas and the defunct, 21.6-megawatt Caonillas hydro plant, which hasn’t fully functioned since at least 1997. 

Since that round of bidding three years ago, however, movement has stalled. The Puerto Rico Public-Private Partnerships Authority, which manages the process, said negotiations are ongoing and that it could not provide additional information until they were finalized.

Maribel Hernandez, a community organizer with the co-op, said the dams could be a game changer for the organization, allowing it to deliver power to 96,000 people across four municipalities.

“Imagine being able to take clean renewable energy to that many people,” she said. “It would be a completely new motor of economic development in these areas, which have always been neglected.”

Back at the Castañer bakery, Sierra said even the small-scale solutions have been transformative. Now, she rarely notices when the lights go out and the batteries kick in on the microgrid.

“What we’re doing here makes me proud,” she said. “A lot of people think this is a small town and a boring place, but I wouldn’t change it for anything.”

(Corrected in the 11th paragraph to note the fee that Sierra is charged by the co-op, which the story originally stated was still being decided. Additionally, not all members of the co-op directly receive electricity service.)

©2022 Bloomberg L.P.