A festive crowd estimated by organisers and the Vatican to be more than 3 million strong, including many who slept in the area and local residents who poured out of homes and buses, turned out to see the Argentine pope on the final day of his week-long trip.
Aerial television footage showed the sand and pavements blanketed with people for several kilometres along the crescent-shaped shoreline.
"I was totally tranquil, waking up among the people on the beach. This view made it a very special and unique experience," said Aline Vonsovicz, a 23-year-old Brazilian of Polish origin.
The throng of people, many in the green and yellow Brazilian colors, gave Francis the kind of ecstatic welcome that he has received all through his trip to his home continent.
They shouted and sang as he was driven through the crowd in an open-sided popemobile, stopping often to kiss babies offered to him by their mothers on the shoreline most famous for its bars and nightclubs and hedonist spirit.
His message to the young people in Rio for week-long World Youth Day festivities, sometimes called "the Church's Woodstock," was serious: they should not make their time in Rio a one-off experience.
In his sermon during the Mass from a huge white stage at the beach's northern tip, he said they should return to their home countries energized and ready to work for social change.
"Bringing the Gospel is bringing God's power to pluck up and break down evil and violence, to destroy and overthrow the barriers of selfishness, intolerance and hatred, so as to build a new world," he said.
For Special Report: A political pope: click link.reuters.com/pyv86t
LATIN AMERICAN PRESIDENTS AT MASS
Brazilian President Dilma Rousseff, Argentine President Cristina Fernandez, Bolivian President Evo Morales and several Latin American vice presidents were among those who attended.
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.
"It was cold in the morning and there was a problem with a long wait for the toilets. Some people went in the sea. It was a bit chaotic. But it was lovely," said Marcel Stelsberg, 27, who came from Copenhagen with a group 65 people from Scandinavia.
"People were playing guitars and drums and singing and dancing to religious songs different languages. Now we don't feel so alone, especially coming from Scandinavia where there are so few of us Catholics," he said.
Francis, who was due to leave for Rome on Sunday night after addressing Latin American bishops, has dedicated much attention in his speeches to the problems, the prospects and the power of youth. He announced that the next World Youth Day will be in Krakow, Poland, in 2016.
On Saturday night, he 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."
Brazil, Latin America's largest nation and still the world's most Catholic country despite declining numbers of faithful, was rocked by protests against corruption, the misuse of public money and the high cost of living.
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.