It’s among the most basic, most critical, and most overlooked resources needed to run a hospital: electricity.

But in Haiti’s Central Plateau, the flow of energy is intermittent at best. Consider that in Mirebalais, located 30 miles north of Port-au-Prince, the power goes out for an average of three hours each day. This poses an enormous challenge to running any hospital; surgeries are jeopardized, neonatal ventilators stall, the cold chain is interrupted, and countless everyday tasks get derailed. As Partners In Health co-founder Paul Farmer noted during a recent lecture at the Harvard School of Public Health, “It’s not great if you’re a surgeon and you have to think about getting the generator going.”

To make sure the patients and staff at Hôpital Universitaire de Mirebalais (University Hospital) aren’t left in the dark, PIH and its partners looked toward the sun. Stretched across the roof of the new 200,000-square-foot hospital is a vast and meticulously arranged array of 1,800 solar panels.

On a bright day, these panels are expected to produce more energy than the hospital will consume. Before the facility even opened its doors—the official opening is slated for March—the system churned out 139 megawatt hours of electricity, enough to charge 22 million smartphones and offset 72 tons of coal. Perhaps most important is that the excess electricity will be fed back into Haiti’s national grid, giving a much-needed boost to the country’s woefully inadequate energy infrastructure.