A massive power outage hit Panama on Sunday, three days before the arrival of Pope Francis for a World Youth Day festival, authorities said.
The electric power company ETESA said service to various parts of the country had been affected by "an event in the integrated national system."
"Teams are working to re-establish service as soon as possible," the company said on Twitter.
ETESA, which gave no details on the cause of the outage, said power would be restored gradually.
Despite the outage, 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 several 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 added, authorities "immediately took control" to keep traffic moving.
Pope Francis is scheduled to visit Panama from Wednesday until Sunday, January 27 for the World Youth Day festival, which is expected to draw at least 200,000 people.
In a video released ahead of his trip, Francis 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 the first to Panama.
The last pope to visit was Pope John Paul II during a tour of Central America in 1983.