Puerto Rican flags hang from a balcony in San Juan after a major power outage hit the island Wednesday.
CNN  — 

Power has been restored to 99.7% of LUMA Energy customers in Puerto Rico, the utility said Sunday, after hundreds of thousands had been in the dark since a fire at a power plant Wednesday evening.

“Electric service has been restored to nearly 1.5 million customers as of Sunday morning,” LUMA said in a statement on its website. Crews are continuing their work “to stabilize the grid and reduce the future risk of intermittent power outages,” the statement said.

The outage began as an island-wide blackout that closed schools and courts for days and caused other interruptions for the US territory’s 3.2 million residents.

LUMA said late Saturday that power had been restored to 1.3 million customers and full restoration was possible by Sunday.

The massive outage began around 8:45 p.m. Wednesday when an unspecified failure led to a fire at the Costa Sur Substation, said Kevin Acevedo, vice president of LUMA Energy. Firefighters have since extinguished the flames at the facility outside the town of Guayanilla on the southwest coast.

The exact cause wasn’t immediately known, the utility has said.

Initially, all customers lost power “because all the generating units went offline,” according to Josué Colón, the island’s lead telecommunications and infrastructure engineer.

In addition to power disruptions, the outage also caused interrupted water service to tens of thousands of homes and businesses, said Puerto Rico Gov. Pedro Pierluisi, who cited the island’s aqueducts and sewers authority.

Schools across the island also canceled classes for students on Thursday and Friday, though principals, custodians and school cafeteria employees were told to report to work Friday, the island’s education department said.

By Thursday afternoon, all hospitals were operational either through power restoration or generators, Secretary of the Interior Noelia García Bardales said.

A man stands on a balcony in San Juan after a major power outage hit Puerto Rico Wednesday evening.

Cause of fire is under investigation

As the lights are turning on in the remaining homes and businesses, little is known about what caused the fire that plunged the island into darkness.

“We understand that many are asking how and why such a large outage happened, LUMA President and CEO Wayne Stensby said in the Sunday statement. “We have begun the detailed investigation into this event and will be fully transparent with our customers, regulators, and the legislature with our findings to determine what actions must be taken to reduce the threat of such large outages.”

The utility said Thursday the “massive island-wide blackout” might have been “caused by a circuit breaker failure” at the Costa Sur plant.

Acevedo, LUMA’s vice president, said the cause of the fire remains under investigation, noting that the equipment was up to date on maintenance inspections.

LUMA is a joint venture of Quanta Services and the Canadian energy company ATCO, which the Puerto Rican government chose to take over the operation of the power grid from its previous public electric utility, the Puerto Rico Electric Power Authority. LUMA has been in charge of the power grid since June 1.

CNN’s Jason Hanna, Rafy Rivera and Michelle Watson contributed to this report.