Pope Francis blesses a child as he rides on the popemobile to celebrate mass in Rio de Janeiro Sunday July 28, 2013. Hundreds of thousands of young people slept under chilly skies in the white sand of Copacabana awaiting Pope Francis" final Mass for World Youth Day. (AP Photo/Jorge Saenz) People pack Copacabana beach in Rio de Janeiro, Brazil, Sunday, July 28, 2013. Hundreds of thousands of young people slept under chilly skies in the white sand awaiting Pope Francis" final Mass for World Youth Day. Nuns wade in the Copacabana beach water, in Rio de Janeiro, Brazil, Sunday, July 28, 2013. Pope Francis wrapped up a historic trip to his home continent Sunday with a Mass on the Copacabana beachfront that drew a reported 3 million people. Pope Francis waves from his popemobile along the Copacabana beachfront on his way to celebrate Mass in Rio de Janeiro, Brazil, Sunday, July 28, 2013. Hundreds of thousands of young people slept under chilly skies in the white sand awaiting Francis" final Mass for World Youth Day. Nuns dance as they wait for the start of a a vigil on Copacabana beach in Rio de Janeiro, Brazil, Saturday, July 27, 2013. Pope Francis drew faithful to Rio's Copacabana beach on Saturday for the final evening of World Youth Day, hours after he chastised the Brazilian church for failing to stem the "exodus" of Catholics to evangelical congregations. RIO DE JANEIRO (AP) - Pope Francis' historic trip to his home continent ended Sunday after a marathon weeklong visit to Brazil that drew millions of people onto the sands of Rio de Janeiro's iconic Copacabana beach and appeared to reinvigorate the clergy and faithful alike in the world's largest Catholic country. Dignitaries including Brazilian Vice President Michel Temer turned out at Rio's Antonio Carlos Jobim international airport to bid farewell to the Argentine-born pontiff after a visit marked by big moments. They included a visit to a vast church dedicated to Brazil's patron saint, a rainy walk through one of Rio's dangerous slums and a papal Mass that was one of the biggest in recent history. Speaking from a white stage on the sands of Copacabana on Sunday, Francis urged a crowd estimated at 3 million people 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 festivities. Later Sunday, he issued a more pointed message to the region's bishops, telling them to better look out for their flocks and put an end to the "clerical" culture that places priests on pedestals - often with what Francis called the "sinful complicity" of lay Catholics who hold the clergy in such high esteem. Despite a series of organizational snafus, including a subway breakdown Wednesday that stranded hundreds of thousands of people for hours, Francis' visit was widely hailed as a success by the Vatican, pilgrims and everyday Brazilians alike. His nonstop agenda was followed live on television for all seven days, his good nature and modesty charming a country has seen the phenomenal rise of Protestant and evangelical Pentecostal churches in the past decades. "You came to see the young people but you ended up enchanting all Brazilians," Temer said on the tarmac of Rio's main airport minutes before the pope's takeoff. He added that the country's door would be permanently open to the pontiff and called on him to "just enter without knocking, because there will always be a place for Your Holiness in Brazilians' hearts." Nearly the entire 4-kilometer-long (2.5 mile) Copacabana beach overflowed Sunday with flag-waving faithful, some of them taking an early morning dip in the Atlantic and others tossing T-shirts, flags and soccer jerseys into the pontiff's open-sided car as he drove by. The numbers clearly overwhelmed the area's services: The stench of garbage and human waste hung in Rio's humid air, and the beach and adjoining chic Atlantic Avenue looked like an improvised refugee camp plunked down in the middle of one of the world's most beautiful cities. "You'd think they could at least put their garbage in all the bins," said Jose da Silva, a 75-year-old retired farm worker who supplements his meager income by collecting empty cans for recycling. I'm also pretty surprised that people who call themselves Christians would throw away all this food. Many of the youngsters on hand for the Mass spent the night on the beach, joining an all-night slumber party to end the Catholic youth fest, with pilgrims wrapped in flags and sleeping bags to ward off the cold. Third place among papal Masses now goes to Rome's World Youth Day in the 2000 Jubilee year, when 2 million people participated. As if recalling that historic Mass, Francis announced Sunday that the next World Youth Day would be held in Krakow in 2016. Francis invited them to participate in the offertory procession Sunday, at which the father wore a T-shirt that read "Stop abortion." Later, the pope thanked some of the 60,000 volunteers who organized the youth festival before flying to Rome. He called on the thousands of young people packed into a vast hall to "be revolutionaries" and "swim against the tide." Francis spent much of the week emphasizing that 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. 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. While speaking to the young volunteers, Francis urged those thinking of dedicating their lives to the church to follow the urge, recalling the day he felt the calling. "I will never forget that day, 21 September - I was 17 years old - when, after stopping in the Church of San Jose de Floresto to go to confession, I first heard God calling me," he said. Do not be afraid of what God asks of you! It is worth saying 'yes' to God. In him we find joy. Associated Press writers Marco Sibaja and Bradley Brooks contributed to this report.