Pope Francis on Saturday encouraged Brazil's young people, who have protested against corruption in their country, to continue their efforts to change society by fighting apathy and offering "a Christian response."
The 76-year-old pope spoke to a crowd estimated by the Vatican to be more than 2 million people gathered on Rio's famed Copacabana beach for an evening rally where he also urged young people to shun fleeting fads and be "athletes of Christ."
Francis, nearly concluding his first overseas trip, received yet another rapturous welcome when he arrived at the crescent-shaped beach. He stopped his popemobile several times to kiss babies and an Argentine flag that was waved at the car.
Most participants planned to spend the night on the sand and adjacent pavement to hold their places for Sunday's closing Mass on the same spot, making the place a giant campsite.
Brazil, Latin America's largest nation, was rocked by massive protests against corruption, the misuse of public money and the high cost of living. Most of the protesters were young.
Francis told the gathering he knew that young people had taken to the streets in Brazil and elsewhere "to express their desire for a society that is more just and fraternal."
Speaking from a giant white stage, he encouraged them to fight apathy and be "protagonists of change" and offer "a Christian response to the social and political concerns arising in many parts of the world."
In his prepared text, he had added that they should do it in an "an orderly, peaceful and responsible way" but he improvised and did not read that part of his address.
The Vatican says that when the pope departs from his prepared text and omits phrases, his thoughts are considered valid nonetheless.
Francis has dedicated much attention in his speeches to the problems, the prospects and the power of young people.
On Friday night he urged them to change a world where food is discarded while millions go hungry, where racism and violence still affront human dignity, and where politics is more associated with corruption than service.
The day before, during a visit to a Rio slum, he urged them to not lose trust and to not allow their hopes to be extinguished. Many young people in Brazil saw this as his support for peaceful demonstrations to bring about change.
'Jesus bigger than World Cup'
The Copacabana events were to have taken place on a pasture on the outskirts of Rio, but days of unseasonable rain turned the area into a field of mud.
Before Saturday's event, young people in jeans and nuns in their habits shared the beach with Rio residents who had streamed out of their homes to welcome back the sun after days of clouds and downpours.
The nuns wet their feet in the surf next to women playing volleyball in bikinis. Young people carrying flags from dozens of nations sat in the sand in groups to pray and play music.
In his address to the young, the pope asked them to hone and perfect their faith like athletes who train for a match.
"Jesus offers us something bigger than the World Cup," he told them, saying they could have a "fulfilled and fruitful life" if they followed him and not "momentary fashions and fads."
He asked them to be "true athletes of Christ."
Earlier in the day, a group of feminists bared their breasts on the beach in a protest against the Church's restrictive views on female sexuality and abortion.
But most Rio residents were happy to have a visit by the pope, who leaves for Rome on Sunday night.
"The Brazilians have welcomed us so warmly. The only hiccup has been the crammed public transport," said Father Martin O'Reilly who led a group of 60 young people from the Diocese of Clogher in Ireland.
With hundreds of buses still arriving in Rio bringing more pilgrims, security officials said they expected the crowd to peak at 1.5 million people during Sunday morning Mass.
Police and soldiers were deployed on waterfront streets while warships patrolled off shore.