(This post was updated at 2:11 p.m. ET.)

Puerto Rico's governor, Alejandro García Padilla, has declared a state of emergency over a power outage that at its peak affected 1.5 million customers.

By morning that number had been cut by a couple hundred thousand, but more than a million customers on the island remained without electricity.

The government-run power company, Autoridad de Energia Eléctrica, said in a tweet that if things go as planned, about half of those customers should have their power restored by the end of the afternoon.

According to the Puerto Rican newspaper El Nuevo Día, a fire at a substation damaged two 230,000-volt power lines, resulting in a massive power outage that is still affecting customers across the island.

The outage meant that hundreds of thousands lost water service, the University of Puerto Rico canceled classes and the Thursday morning commute was chaotic, the newspaper reports.

El Nuevo Día adds that this is the worst outage in 36 years. In 1980, an employee accidentally hit a switch that short-circuited the entire system.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.