Francis deviated from his prepared remarks Thursday to praise the estimated 250,000 young people, many waving their national flags, for coming together even though they speak different languages and hail from different cultures.
He said: "These builders of walls that sow fear are looking to divide people and box them in." It was a clear reference to the proposed border wall at the U.S.-Mexico border. He asked the crowd: "What do you want to be?" The crowd chanted back "Builders of bridges."
Some in the crowd at World Youth Day in Panama City are Venezuelans keeping tabs on the political crisis unfolding back home in their country.
A huge banner at the rally urges Pope Francis to "pray for Venezuela."
Carlos Bonilla is a 25-year-old Venezuelan who has been living in Panama for 10 years.
He said Thursday that he hopes the pontiff will "give us strength and send encouragement and hope to the people who are suffering and dying there."
On Wednesday the opposition leader of Venezuela's congress declared himself interim president in a challenge to President Nicolas Maduro.
This month Maduro was inaugurated for a new six-year term after an election that many say was illegitimate because his main opponents were barred from running.
The country has been suffering from a severe economic crisis with widespread shortages of basic goods.
Tens of thousands of young people, waving huge flags from around the world, have given Pope Francis a rousing welcome as he formally opens World Youth Day at a twilight rally on Panama City's coast.
It's the Argentine-born pontiff's first contact with the masses who have gathered for the Catholic festival that lasts through Sunday. Organizers said some 200,000 people were on hand.
Many waited in line over two hours to get into the seaside park where the event is being hosted.
Pedro Perez is a 17-year-old Colombian who traveled to Panama from his country's capital, Bogota, in a group of 60 youths. He says "more organization was needed."
Perez sat on the ground Thursday and said he was waiting to hear "a message of peace and unity among all nations."
The Vatican says Pope Francis is closely following developments in Venezuela and supports "all efforts that help save the population from further suffering".
A statement from Vatican spokesman Alessandro Gisotti on Thursday didn't say if the Holy See recognized opposition leader Juan Guaido's claim to the interim presidency.
Francis is nearby on a visit to Panama for World Youth Day.
The statement said the pope "is praying for the victims and for all the people of Venezuela." It adds that "the Holy See supports all efforts that help save the population from further suffering".
The Vatican has a delicate line to balance in Venezuela. Local bishops vocally oppose the socialist regime of President Nicholas Maduro, but the Holy See has kept up diplomatic relations with the government, to the extent that it sent its interim charge d'affairs to Maduro's inauguration earlier this month.
Pope Francis is urging bishops across Central America to work together to welcome, protect and integrate migrants and serve as an example to help the rest of society overcome fears about foreigners.
Francis summoned bishops from across the region — Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua and Panama — to join him for World Youth Day in Panama which is taking place against the backdrop of a standoff in the U.S. over President Donald Trump's proposed border wall.
Meeting with the bishops Thursday, Francis didn't mention the wall but he reminded the prelates that most migrants have "young faces."
He said: "The Church, by virtue of her universality, can provide the fraternal hospitality and acceptance that can enable the communities of origin and of destination to dialogue and to help overcome fears and suspicions, and thus to consolidate the very bonds that migrations - in the collective imagination - threaten to break."
Pope Francis is demanding Panamanian public officials live simply, honestly and transparently as he opens a visit to a region that has been rife with corruption scandals and is now coping with political upheaval in nearby Venezuela.
Francis didn't mention the Venezuela crisis Thursday during his first remarks in Panama after a meeting with President Juan Carlos Varela at the presidential palace. He stuck to his script, celebrating Panama's indigenous heritage and its role as bridge between oceans and cultures. He thanked the government for "opening the doors of your home" to young pilgrims who have flocked here for World Youth Day.
But he stressed that those same young people are increasingly insisting that public officials live lives that are coherent with the jobs entrusted to them, "To lead a life that demonstrates that public service is a synonym of honesty and justice, and opposed to all forms of corruption."
Pope Francis has arrived in Panama amid a political crisis in nearby Venezuela, a migration standoff over the proposed U.S.-Mexico border wall and tens of thousands of wildly excited young Central Americans welcoming him.
Francis opens his first full day Thursday with all eyes on whether he refers to the upheaval in Venezuela when he addresses Panama's president and later the region's bishops.
Francis rounds out the day with his evening welcome to tens of thousands of young Catholics gathered for World Youth Day, the church's big youth rally.
His visit is taking place against the backdrop of a new migrant caravan heading to the U.S.-Mexico border. The plight of migrants, as well as that of indigenous peoples, are particularly close to Francis' heart and are expected to feature into his remarks while in Panama.