A reported three million pilgrims packed Brazil's Copacabana Beach to hear Pope Francis' final Mass of his historic trip to his home continent.
Overnight millions of pilgrims camped out on the famous stretch of beach.
Such is the appeal of the new pope that some commenters noted that the new head of the Catholic church had 'rock star' appeal - drawing more people to see him than the Rolling Stones did on their visit to the beach in 2006.
Mick Jagger and his band drew a much reported one million fans.
The pope who was attending the world's biggest Catholic World Youth Day will now leave Brazil after the five day visit - his first overseas trip as pontiff.
The attendance figure, given by local media citing the mayor's office, is higher than the 1 million at the last World Youth Day vigil in Madrid in 2011, and far more than the 650,000 at Toronto's 2002 vigil.
The mass led to almost every inch of the two mile and a half long beach being covered with spectators.
Female activists demonstrating over abortion and women's rights held a protest to coincide with the visit yesterday.
Speaking from a white stage and looking out over the enormous crowd, Francis urged young Catholics to go out and spread their faith "to the fringes of society, even to those who seem farthest away, most indifferent."
"The church needs you, your enthusiasm, your creativity and the joy that is so characteristic of you!" he said to applause in his final homily of World Youth Day.
After Sunday's Mass, Francis was meeting with the bishops of Latin America and the Caribbean, as well as holding a thank-you audience with some of the 60,000 volunteers who organized the youth festival. He was leaving for Rome Sunday night.
"It was such an excellent week, everybody was in such good spirit, you could just feel a sense of peace," said Denise da Silva, a Rio de Janeiro Catholic who was sitting alone on the beach Sunday morning, a Brazilian flag painted on her face. "I have never seen something here in Rio so marvelous as what we have just lived."
Francis has spent the week emphasizing a core message: of the need for Catholics, lay and religious, to shake up the status quo, get out of their stuffy sacristies and reach the faithful on the margins of society or risk losing them to rival churches.
According to census data, the number of Catholics in Brazil dipped from 125 million in 2000 to 123 million in 2010, with the church's share of the total population dropping from 74 percent to 65 percent. During the same time period, the number of evangelical Protestants and Pentecostals jumped from 26 million to 42 million, increasing from 15 percent to 22 percent of the population in 2010.
Francis repeated that stirring message Sunday in his homily, saying he was counting on young Catholics in particular to be "missionary disciples" and spread the faith.
"Bringing the Gospel is bringing God's power to pluck up and break down evil and violence, to destroy and overthrow the barriers and selfishness, intolerance and hatred, so as to build a new world," he said.
Additional reporting by Associated Press