Uruguay is close to allowing the legal sale of marijuana, with other countries pondering similar liberalisation.
Earlier, the Argentine-born pontiff celebrated the first Mass of his trip, at the Shrine of Our Lady of Aparecida.
He warned tens of thousands of faithful against the "passing idols" of money, power and pleasure.
After the visit to Aparecida, in the Brazilian state of Sao Paulo, the pope flew back to Rio de Janeiro.
At the inauguration of a drug rehabilitation clinic at the Sao Francisco hospital, he hugged former addicts and heard their stories.
More about: