Pope Francis addressed two million Catholic pilgrims at a late-night vigil on Rio de Janeiro's Copacabana beach on Saturday, hailing the world's young as its only legitimate "actors of change".
"The young people in the street are the ones who want to be actors of change," said the pope. "Please don't let others be actors of change."
More than one million Brazilians took to the streets last month to demand better public services and an end to corruption, in protests spearheaded by Brazil's youth.
It was the third successive night the charismatic pontiff drew huge crowds on the Copacabana sands. Vatican spokesman Federico Lombardi said two million people attended the vigil.
The Mayor of Rio, Eduardo Paes, said Sunday's mass was expected to draw bigger crowds, of up to three million people, as the pope concluded his week-long visit to the world's most populous Catholic country.
At a mass earlier, the Argentine pontiff, 76, renewed his call for priests to go out of their cloistered parishes and bring the message of the Gospel to the world's slums.
"It is in the favelas... that we must go to seek and serve Christ," he told thousands of bishops and priests from around the world at a mass at the city's St Sebastian Cathedral.
"We cannot keep ourselves shut up in parishes, in our communities, when so many people are waiting for the Gospel," he said.
He called on Brazil's elite to use "constructive dialogue" to mediate between maintaining the status quo and fending off violent upheaval.
"Constructive dialogue... (is) essential for facing the present moment," Francis said. "Between selfish indifference and violent protest there is always another possible option: that of dialogue."
Francis then hugged several Amazon natives with pierced noses and body paint, and was presented with a tribal headdress by one.
Ubirai Pataxo removed his headgear and handed it to the pope, who was immediately photographed donning the ceremonial piece.
"This headdress is a protection amulet which links the spirit and the Earth. There is no better person than the pope to receive it," said Pataxo.
"I am deeply honoured. We are all Catholic and the pope is a spiritual leader for all peoples."
Indigenous people represent 1% of Brazil's 194 million people and occupy 12% of the national territory, mainly in the Amazon.
As night fell, Francis drew on the analogy of football to address the vigil, which fell on World Youth Day.
"Here in Brazil, as in other countries, soccer is a national passion," said the pontiff, a keen follower of Buenos Aires side San Lorenzo.
"Now, what do players do when they are asked to join a team? They have to train, and to train a lot. The same is true of our lives as the Lord's disciples.
"Jesus offers us something bigger than the World Cup. You are the athletes of Christ."
The Vatican has been alarmed by the growing strength of Evangelical Protestant churches in Brazil, as well as the spread of secularism.
He called for a "church able to enter dialogue with those disciples who, having left Jerusalem behind, are wandering aimlessly, alone, with their own disappointment - disillusioned by a Christianity now considered barren, fruitless soil".
Wearing a white overcoat because of the cold, rainy weather, Francis waved at crowds from his open-sided Popemobile, blessing the faithful lining the avenue along the seafront.
Watch the pope arriving at Copacabana beach below: