Panama City - A massive power outage hit Panama on Sunday just days before the arrival of Pope Francis, leaving traffic lights inoperable, businesses in the dark, and gas stations unable to pump fuel for some six hours.
The pope is set to arrive in Panama on Wednesday for the World Youth Day festival, an event expected to attract some 200,000 young Catholics from across the globe.
Panamanian electric power company ETESA said service to most of the country shut down starting at 11:42 am (1642 GMT) Sunday.
ETESA said it identified the location of the problem, but did not say what caused the blackout.
Some six hours later President Juan Carlos Varela announced via Twitter "the full re-establishment" of the national power grid after meeting with senior ETESA officials.
The company said some parts of neighbouring Costa Rica and Nicaragua were also hit by the power outage.
Varela said the blackout was unrelated to the pope's visit.
The Panama City subway system fully closed down during the blackout.
"I was on the subway, and they made us get out and walk," said Panama City resident Pedro Flores, 23.
Mother-of-four Dalicia Gonzalez, 38, was unimpressed by the papal hoopla and worried about more immediate issues.
"I could care less about the pope. I care about my home, and what are we going to do? What a nightmare!" she said, as she bought sweets in a dark shopping centre.
President Varela called for calm and urged Panamanians "to keep things normal."
The capital city's Tocumen International Airport and the busy and vital Panama Canal were able to activate backup systems and maintain normal operations, authorities said.
But water supplies were affected in many parts of the country. The water treatment plant serving Panama City was among those knocked out, the country's Institute of Aqueducts and Sewers said on Twitter.
Domingo Espitia, coordinator of an interagency task force preparing for the papal visit, said that contingency plans had been successfully implemented when the power went out.
"The Panamanian state is prepared for this type of contingency," he told reporters. He said Tocumen airport had maintained "100 percent" of its normal operations.
When traffic lights went out, Espitia said that authorities "immediately took control" to keep traffic moving.
Pope Francis is scheduled to visit Panama from Wednesday until Sunday, January 27, for the massive World Youth Day festival. The event is expected to attract faithful from 150 countries.
In a video released ahead of his trip, Francis, 82, said he would urge young people to take on the challenges of poverty, violence and migration, and "change the world."
It will be the 26th foreign trip by the Argentine-born pope since he was chosen to lead the Catholic Church in early 2013 and his first to Panama.
The last pope to visit Panama was Pope John Paul II during a tour of Central America in 1983.