SAN JUAN, P.R. — A main power line that serves the northern half of Puerto Rico failed Thursday, knocking out electricity to seven cities that had only recently regained service and dealing a major setback to the island’s desperate efforts to regain normality.

Seven weeks after Hurricane Maria completely disabled Puerto Rico’s power grid, the island was generating just 18 percent of its electrical capacity, returning service to where it had been two and half weeks ago. On Thursday morning, the island had been at about 43.2 percent of capacity.

The disruption also meant that many people no longer had running water, because pumping stations are powered by electricity.

“We’re all in the dark,” said Maritza Cuprill, 54, a property manager whose San Juan condominium got its power back a week ago, only to lose it again on Thursday. “I was in Walgreens and everything suddenly went pitch black. The first thing I thought of was my vehicle: I filled up the tank for just in case. That was devastating when we had to wait in lines for five, six and seven hours.”