San Juan, Puerto Rico (CNN) Power was gradually returning to San Juan, Puerto Rico, on Thursday after a massive outage struck the city.

The problem was with a failure on a main north-south transmission line, said Fernando Padilla, an official with the Puerto Rico Electric Power Authority, known as PREPA.

"It was a mechanical issue on the line, could have happened at any line," he said. "It's being patrolled and repaired by PREPA."

Power went out about 11:30 a.m. local time (10:30 a.m. ET) and was repaired Thursday night, said Ricardo Ramos Rodriguez, executive director of PREPA.

PREPA spokesman Carlos Monroig said 25% of power was back and he expects 42% of power to be restored by Friday morning. He said he didn't know what caused the transmission line to fail.

Read More