SAN JUAN, PUERTO RICO — An island-wide blackout hit Puerto Rico on Wednesday after an excavator accidentally downed a transmission line, officials said, as the U.S. territory struggles to repair an increasingly unstable power grid nearly seven months after Hurricane Maria.



Officials said it could take 24 to 36 hours to fully restore power to more than 1.4 million customers as outrage grew across the island about the state of Puerto Rico's Electric Power Authority. It was the second major outage in less than a week, with the previous one affecting some 840,000 customers.



"This is too much," said Luis Oscar Rivera, a computer technician who just got normal power back at his house less than two months ago. "It's like the first day of Maria all over again."



Several large power outages have hit Puerto Rico in recent months, but Wednesday was the first time since the hurricane struck Sept. 20 that the U.S. territory has experienced a full island-wide blackout.



The outage snarled traffic across the island, interrupted classes and work, and forced dozens of businesses to temporarily close, including the largest mall and popular tourist attractions like a 16th century fort in the historic part of Puerto Rico's capital. Long lines formed stations across the island, while authorities offered assurances that there was enough gasoline available.



Backup generators roared to life at the island's largest public hospital and at its main international airport, where officials reported no cancellations or delays. Meanwhile, the power company said its own customer service center was out of service and asked people to go online or use the phone.



Officials said restoring power to hospitals, airports, banking centers and water pumping systems was their priority. Following that would be businesses and then homes.



By late in the afternoon, power had returned to several hospitals and at least five of the island's 78 municipalities.



Carmen Yulin Cruz, mayor of the capital of San Juan, said the outage would not interrupt the last of a two-game series between the Cleveland Indians and Minnesota Twins, which is being played on the island. She said all emergency systems at Hiram Bithorn stadium are functioning and that tower lights and additional security will be placed at the stadium's parking lot.



Justo Gonzalez, the power company's executive sub-director, told reporters that a private contractor removing a collapsed tower during unrelated power restoration efforts near the south coast hit the transmission line on Wednesday with an excavator.



"We are working in areas that are quite crowded with high voltage lines," he said.



It is the second such incident in less than a week. On Thursday, a tree fell on a power line as the same private contractor cleared land in central Puerto Rico, leading to a widespread power outage. A backup line that was supposed to prevent that outage failed.



Fredyson Martinez, vice president of a union that represents power company workers in Puerto Rico, told The Associated Press that he was concerned about the two back-to-back incidents.



"That is not normal," he said.



Government officials said that a company hired by Cobra Energy known as Dgrimm was involved in both incidents that led to the power outages. Dgrimm had been asked to change its security protocols after the first incident, and it has since been terminated, said William Rios, power generation director.



"This is unacceptable for us," he said, adding that government attorneys are meeting with officials at Cobra Energy, a Mammoth Energy subsidiary.