APARECIDA, Brazil — Pope Francis made an emotional plea Wednesday for Roman Catholics to shun materialism in the first public Mass of his initial international trip as pontiff, then met with drug addicts and denounced the "dealers of death" who fuel their suffering.

On his first full day of activities in Brazil, Francis traveled from one of the most important shrines in Latin America, Our Lady of Aparecida, to what he called a "shrine of human suffering" — a hospital in Rio de Janeiro that treats substance abusers.

Both encounters had a common theme that the humble pope has stressed during his young papacy: a denunciation of the "ephemeral idols" of money and power and a need for the Catholic Church to focus on the poor and outcasts of society.

Francis started his day traveling to Aparecida, where thousands packed into the huge Basilica of the Shrine of Our Lady of Aparecida in an agricultural region of verdant fields between Rio and Sao Paolo. Tens of thousands more braved a cold rain outside to catch a glimpse of the first pope from the Americas returning to a shrine of great meaning to the continent and to Francis himself.

Before the Mass, Francis stood in silent prayer in front of the 15-inch statue of the Virgin of Aparecida, the "Black Mary," his eyes tearing up as he breathed heavily. He later carried a replica of it in his arms, visibly moved at the gift he had been given. Francis has entrusted his papacy to the Virgin Mary and, like many Catholics in Latin America, places great importance in devotion to Mary.

After his Mass, the pope blessed the tens of thousands gathered outside the basilica and announced that he would return to Aparecida in 2017, the year that marks the 300th anniversary of a fisherman finding the Black Mary statue in a nearby river.

Back in Rio, Francis arrived in a closed car at the simple white and yellow St. Francis of Assisi hospital — named for Francis' namesake, the 13th century friar who renounced a wealthy, dissolute lifestyle to embrace a life of poverty and simplicity. The pope bounded out of the car into a cold rain, not waiting for an umbrella, and greeted a group of people in wheelchairs and well-wishers.

Before the pope spoke, former drug addicts stood up and told their stories — and received an embrace from the pope who listened intently.

The pope then blasted the "dealers of death" who sell drugs and said that the "scourge of drug-trafficking, that favors violence and sows the seeds of suffering and death, requires of society as a whole an act of courage."

"A reduction in the spread and influence of drug addiction will not be achieved by a liberalization of drug use, as is currently being proposed in various parts of Latin America," the pontiff said. "Rather, it is necessary to confront the problems underlying the use of these drugs, by promoting greater justice, educating young people in the values that build up life in society, accompanying those in difficulty and giving them hope for the future."

The rejection of drug legalization ideas raised by some leaders in this region was an unusually political call from Francis, who has tended to steer clear of making pronouncements on touchy issues. He has instead let local bishops speak out themselves.

During his homily in Aparecida, Francis urged Catholics to keep their values of faith, generosity and fraternity.

"It is true that nowadays, to some extent, everyone, including our young people, feels attracted by the many idols which take the place of God and appear to offer hope: money, success, power, pleasure," he said. "Often a growing sense of loneliness and emptiness in the hearts of many people leads them to seek satisfaction in these ephemeral idols."

The church is struggling in Latin America to keep Catholics from straying to evangelical and Pentecostal churches that often promise help in finding material wealth, an alluring attraction in a poverty-wracked continent. Francis' top priority as pope has been to reach out to the world's poor and inspire Catholic leaders to go to slums and other peripheries to preach.

It was no coincidence, then, that the first major event of his first foreign trip as pope was a Mass in Aparecida. The shrine, which draws 11 million pilgrims a year, hosted a critical 2007 meeting of Latin American bishops who, under the guidance of then-Cardinal Jorge Mario Bergoglio, drafted a mission statement on how to reinvigorate the faith on the continent.

"I've seen people in my own congregation leave because the evangelicals offer them something new and exciting, and the Catholic Church was seen as kind of old and stuffy," Marcia Cecilia de Souza, owner of a private school in the southern state of Santa Catarina, said as she searched for newspaper to stuff into her soaked leather boots. "Francis is such an inspiration, so humble and giving, I think he's going to bring people back into the fold."

Unlike the scenes of chaos that greeted Francis upon his Monday arrival in Rio, when a mob of faithful swarmed his motorcade from the airport, the security situation in Aparecida was far more controlled. Chest-high barriers kept people far from his car. Soldiers in camouflage, emergency crews in raincoats and other uniformed security forces stood guard along his route while his bodyguards walked along the side of his vehicle.

Not all were pleased with the increased security.

"They put up a Berlin Wall between us and the pope and we couldn't get anywhere near him. You could tell he wanted to get close to us, but the police really insisted on this separation," said Joao Franklin, from Minas Gerais state. "I felt really excluded by all these barriers and don't see the need for them."

Nacilda de Oliveira Silva, a maid perched at the front of the crowd, was barely tall enough to see over the metal barrier.

"I have been up for almost 24 hours, most of that time on my feet and in the rain and the cold. But I don't feel any pain. I feel bathed in God's glory, and that's because of the pope. For me, it's the same thing as seeing Jesus pass by. That's how moved I feel."

Francis is in Brazil for World Youth Day, a church event that brings together young Catholics from around the world roughly every three years. Approximately 350,000 young pilgrims signed up to officially take part in the events.