Pope Francis acknowledged on Saturday that the Catholic Church was "wounded by sin" in a message addressed to priests and seminarians reeling from sexual abuse scandals and coverups.
In a mass that he officiated at the centuries-old 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."
Later, at a massive vigil that the organizers said drew 600,000 pilgrims to a park outside Panama City, the pope called on young people to reject the temptation to live their lives online and get involved in their communities.
Life was not "in the cloud, waiting to be downloaded, a new app to be discovered, or a technique of mental self-improvement," the 82-year-old pontiff said during a grandfatherly discourse.
He urged them "to embrace life as it presented itself," and look for areas where "with your hands, your heart and your head, you can feel part of a larger community that needs you and that you yourselves need."
The pope arrived in his Popemobile, waving to the cheering crowd who welcomed Francis with a sea of waving national flags. A choir or hundreds swaying and clapping pilgrims welcomed him onto a vast multi-tiered stage amid a sophisticated light-show.
As dusk turned to night, the slickly produced two-hour vigil featured music, dance and periods of quiet contemplation.
Speaking at length about young people's difficulties in finding meaning in their lives, Francis said many young people often feel "invisible" -- "rootless and parched without work, without education, without community, without family."
Going off script momentarily, he added: "These four 'withouts' kill".
In his earlier homily to the seminarians, Francis' reference to the sex abuse scandals rocking the Church was his first since his arrival in Panama on Wednesday.
It came up again during a lunch he hosted with the Archbishop of Panama, Cardinal Jose Domingo Ulloa, for 10 young people of different nationalities attending World Youth Day, held every three years.
There, sitting over lunch at a white linen covered table, the pope referred to clerical sex abuse as "a horrible crime."
He was responding to a question from a young Mexican immigrant to the US, Brenda Berenice Noriega, about the crisis.
"He called it a horrible crime," Noriega told a press conference after the lunch, a tradition at the global gatherings.
She said it meant a lot to her to hear the pope say at the lunch that "all the victims of the sexual crisis" had to be heard, "and that the Church is committed to supporting them."
Francis has called senior bishops from around the world to Rome next month to deal with widespread clergy sex abuse of children and young people.
The Vatican has billed the February 21-24 meeting as a unique chance to provide bishops with "concrete measures" to tackle the "terrible plague" of sex abuse by the clergy.
Addressing white-robed young seminarians and priests during the mass, the pope said "a subtle weariness" had entered Church communities that "calls into question the energy resources and viability of our mission in this changing and challenging world."
Those changes, he said, "call into doubt the very viability of religious life in today's world."
But the notion that religious communities had nothing to contribute -- that the world "has no room for our message" -- would be "one of the worst heresies possible in our time."
The pope winds up his five-day trip to Panama on Sunday with a giant open-air mass followed by a visit to a centre for young HIV and AIDS patients called the Good Samaritan Home in the city.
He has used his encounter with young people in Central America this week to speak out strongly 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 US President Donald Trump's plans to build a border wall against migrants, the pope a giant prayer meeting on Saturday that it was "senseless" to condemn every immigrant "as a threat to society."