"Faced with the grave situation it is going through, I ask the Lord that a just and peaceful solution is sought and achieved in order to overcome the crisis, respecting human rights (and) the good of all the people of the country," he said.

Venezuela's President Nicolas Maduro rejected an international ultimatum to call elections within eight days as opposition lawmaker Juan Guaido violated the constitution by declaring himself "interim president."

"Here in Panama, I have thought a lot about the people of Venezuela with whom I feel particularly united at the moment during these days.

Faced with the grave situation Venezuela is going through, I ask the Lord that a just and peaceful solution is sought and achieved in order to overcome the crisis, respecting human rights and wishing exclusively for the good of all the people of the country. I invite you to pray, placing this prayer under the intercession of Coromoto, patron saint of Venezuela."

Francis also condemned the twin bombings that killed at least 20 people during a Catholic Church service in the Philippines as a "terrorist attack" and prayed that God would convert the hearts of those who carried it out.

The attack also wounded 81 and was one of the deadliest in recent years in a region long plagued by instability.

Francis, speaking at a hospice for AIDS sufferers on the last day of his trip here, expressed his "firm condemnation of this act of violence that causes more mourning in the Christian community. I pray for the dead and the injured. May the Lord, prince of peace, convert the hearts of the violent ones."

Francis also condemned an ELN car bomb blast at a police academy in Bogota that killed 21 people.

The pope, who on Saturday admitted the Church had been "wounded" by a deepening clergy sex abuse crisis, will celebrate the second open-air mass of his visit at a park on the outskirts of Panama City.

Celebrating mass at the landmark Cathedral of Santa Maria La Antigua in Panama City, Francis warned of the "weariness of hope that comes from seeing a Church wounded by sin, which has so often failed to hear all those cries."

At a lunch meeting with 10 young pilgrims, Francis said sex abuse by the clergy was "a horrible crime," according to one of the guests.

The Argentine pope has used his encounter with young people in Central America to speak out repeatedly in defense of migrants, and address other problems affecting the region such as poverty, drug trafficking, violence and what he said was a regional "plague" of murders of women.

In a swipe at U.S. President Donald Trump's plans to build a border wall against migrants, the pope said at a giant prayer meeting on Saturday that it was "senseless" to condemn every immigrant "as a threat to society."

During that mass Francis consecrated a new altar at the restored basilica, rubbing it down with holy oil and blessing it in a solemn ceremony.

Installed in the altar were the relics of three Latin American saints, including Oscar Romero -- the San Salvador archbishop murdered while giving mass by a far-right hit squad in El Salvador in 1980 -- who was made a saint by Francis last year.