Pope Francis has told authorities and civil society leaders in the Brazilian city of Rio de Janeiro to use dialogue as an alternative to "selfish indifference and violent protest".
The country has seen several violent demonstrations in the past month.
Earlier, the Pope challenged clergy to leave the comfort of their churches and reach out to the marginalised.
Hundreds of thousands of pilgrims are marching towards Rio's Copacabana beach for a 24-hour vigil later on Saturday.
The vigil will be opened by Pope Francis and is set to culminate on Sunday with a communal Mass, which also marks the end of the World Youth Day festival in Brazil.
Up to 1.5m young pilgrims are expected at Copacabana beach this weekend, following a last-minute change of venue due to floods in the area where the vigil was supposed to take place.
Before opening the vigil, on the penultimate day of his first major international trip, the Pope addressed civil leaders and government officials at Rio's Municipal Theatre.
"Between selfish indifference and violent protest there is always another possible option: that of dialogue,'' he told the audience in a reference to the demonstrations that have been rocking the country since June.
"A country grows when constructive dialogue occurs between its many rich cultural components: popular culture, university culture, youth culture, artistic and technological culture, economic culture, family culture and media culture.''
On Friday, shortly after the Pope finished speaking, police held a group of activists who tried to invade the stage in a protest against the state governor of Rio, Sergio Cabral.
Around the same time, in Brazil's largest city, Sao Paulo, some 300 demonstrators attacked bank branches and at least one police post.
Several of Sao Paulo's main avenues had to be temporarily blocked. Tear gas was used to disperse the protesters.
Also on Saturday, the Pope repeated his challenge to fellow Roman Catholic clerics to take to the streets.
In a speech to a thousand bishops and clerics in Rio's cathedral, he said they should go to the favelas, as Brazilian shanty towns are known.
"We cannot keep ourselves shut up in parishes, in our communities, when so many people are waiting for the Gospel," he told the audience.
On Friday, Pope Francis also spoke about the lack of faith in political institutions perceived as selfish and corrupt by young people.
"Jesus is united with so many young people who have lost faith in political institutions, because they see in them only selfishness and corruption,'' Pope Francis said.
Protests, sometimes violent, broke out in cities across Brazil last month against corruption, poor public services and the high cost of events like the 2014 World Cup.
The 76-year-old Pope also expressed understanding for Christians who had lost faith in the Church because of what he called the "incoherence of Christians and ministers of the gospel".
The Roman Catholic Church has been rocked by scandals over sexual abuse by priests.