Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Power was restored across the island of Puerto Rico on Thursday afternoon — a day after an islandwide blackout crippled the U.S. territory seven months after the devastation of Hurricane Maria.

The Puerto Rico Electric Power Authority said on Twitter Thursday afternoon that electricity was restored to all of its customers who had power before the failure. The power authority said that in all, 97 percent of its customers had their power restored.

Geraldo Quiñones López, a spokesman for the power authority, told NBC News earlier Thursday that the electrical system was stabilizing.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

“What’s happening is that the places where there are more clients who remain without power were the areas most impacted, damaged by the hurricane,” he said.

Quiñones said crews were working vigorously to restore power to those customers who had power before Wednesday’s blackout. More than 41,000 customers have not had their power restored seven months after the Hurricane Maria.

While Puerto Rico had been hit with several major blackouts in the hurricane’s wake, Wednesday marked the first time power was knocked out to the entire island since the Category 4 hurricane made landfall on Sept. 20.

A dark street in San Juan, Puerto Rico, on Thursday. Gabriel Lopez Albarran / Reuters

Justo González, an executive deputy director of the power authority, said Wednesday that the blackout was caused by a private contractor whose bulldozer downed a transmission line while trying to remove a collapsed tower.

The latest blackout came just one week after 840,000 customers were left without power after a tree fell on another power line in the center of the island. A backup line that was supposed to prevent such an outage also failed.

The same contractor was involved in Wednesday's and last week's failures, and has been fired.

Puerto Rico's legislators are currently debating whether to privatize the island's power authority, which is $14 billion in debt.