After he arrived at the beach-front stage, though, the crowd along the streets melted away, driven home by the pouring rain that brought out vendors selling the plastic ponchos that have adorned cardinals and pilgrims alike during this unseasonably cold, wet week.
In an indication of the havoc wreaked by four days of steady showers, organizers made an almost unheard-of change in the festival's agenda, moving the Saturday vigil and climactic Sunday Mass to Copacabana Beach from a rural area 30 miles (50 kilometers) from the city center. The terrain of the area, Guaratiba, had turned into a vast field of mud, making the overnight camping plans of pilgrims untenable.
The news was welcome to John White, a 57-year-old chaperone from the Albany, New York, diocese who attended the past five World Youth Days and complained that organization in Rio was lacking.
"I'm super relieved. That place is a mud pit and I was concerned about the kid's health and that they might catch hypothermia," he said. "That's great news. I just wish the organizers would have told us."
Francis' visit to the Varginha slum followed in the footsteps of Pope John Paul II, who visited two such favelas during a 1980 trip to Brazil, and Mother Teresa, who visited Varginha itself in 1972. Her Missionaries of Charity order has kept a presence in the shantytown ever since.
Like Mother Teresa, Francis brought his own personal history to the visit: As archbishop of Buenos Aires, then-Cardinal Jorge Mario Bergoglio frequently preached in the poverty-wracked slums of his native city, putting into action his belief that the Catholic Church must go to the farthest peripheries to preach and not sit back and wait for the most marginalized to come to Sunday Mass.
Francis' open-air car was mobbed on a few occasions as he headed into Varginha's heavily policed, shack-lined streets, but he never seemed in danger. He was showered with gifts as he walked down one of the slum's main drags without an umbrella to shield him from the rain. A well-wisher gave him a paper lei to hang around his neck and he held up another offering — a scarf from his favorite soccer team, Buenos Aires' San Lorenzo.
"Events like this, with the pope and all the local media, get everyone so excited," said Antonieta de Souza Costa, a 56-year-old vendor and resident of Varginha. "I think this visit is going to bring people back to the Catholic Church."
Addressing Varginha's residents, Francis acknowledged that young people in particular have a sensitivity toward injustice.
"You are often disappointed by facts that speak of corruption on the part of people who put their own interests before the common good," Francis told the crowd. "To you and all, I repeat: Never yield to discouragement, do not lose trust, do not allow your hope to be extinguished."
It was a clear reference to the violent protests that paralyzed parts of the country in recent weeks as Brazilians furious over rampant corruption and inefficiency within the country's political class took to the streets.
Francis blasted what he said was a "culture of selfishness and individualism" that permeates society today, demanding that those with money and power share their wealth and resources to fight hunger and poverty.
"It is certainly necessary to give bread to the hungry — this is an act of justice. But there is also a deeper hunger, the hunger for a happiness that only God can satisfy," he said.
Associated Press writer Bradley Brooks contributed to this report.
Nicole Winfield on Twitter: www.twitter.com/nwinfield
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.