APARECIDA, Brazil (AP) - Pope Francis urged Catholics to resist the "ephemeral idols" of money, power and pleasure during a pilgrimage Wednesday to one of the most important shrines in Latin America

Francis celebrated the first public Mass of his trip to Brazil after praying before the statue of Our Lady of Aparecida, Brazil's patron saint. His eyes welled up with emotion as he stood silently in deep prayer before the tiny dark-skinned statue.

In his homily, Francis appealed for the faithful to not seek out false idols of money and success that he said take the place of God. Rather, he called for Brazilians to keep Christian values of faith, generosity and fraternity.

Crowds roared, church bells rang out and a multitude of faithful waved in jubilation as the pope arrived in this small town, where thousands packed into the cavernous Basilica of the Shrine of Our Lady of Aparecida.

A powerful choir burst into song as Pope Francis arrived and tens of thousands of additional believers braved a cold rain outside.

Francis paused in deep prayer before the statue of the virgin, his eyes tearing up as he breathed heavily. He touched the frame holding the statue and made the sign of the cross as a small group of prelates behind him applauded.

It was a deeply personal moment for this pontiff, who has entrusted his papacy to the Virgin Mary and, who like many Catholics in Latin America, places great importance in Marian devotion.

Outside the basilica, Felipe Cirto, a 20-year-old law student, vibrated with energy as the pope passed a few meters from him.

"It was a once in a lifetime experience for us," said Cirto, who was waving and snapping photos simultaneously as the pope's open-air vehicle glided by. "He enchanted us with his smile, with his gentle manners, with his warmth. I think he knows he has a home in Brazil, in the hearts of the Brazilian people."

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 the faithful 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 car.

Nacilda de Oliveira Silva, a short 61-year-old maid, perched at the front of the crowd though she 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."

Before the Mass, some pilgrims sought shelter from the Southern Hemisphere winter chill beneath tarps while others wrapped themselves in blankets and sleeping bags. And many left offerings to the Virgin.

Lena Halfeld, a 65-year-old housewife, paused to add her offering to a cardboard box filled with stuffed animals, leg braces and other personal objects. She deposited an embossed invitation to her niece's December wedding, which she was praying for the Virgin to bless.

"I have real faith in the powers of the Virgin of Aparecida," said Halfeld, adding she had made the hours-long trip to the church once a week for a year during her husband's recent illness. "Now he's cured, so I owe it all to her. I can't think of a more wonderful setting to see the new pope."

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 Youth Day events.

In Aparecida, 16-year-old Natalia Pereira, a high school student from Sao Paulo state, said the cold rain she endured to get to the basilica was a "test of faith."

"I've been up all night in line, I'm soaked to the bone and freezing but I'm so excited that it's worth it," said Pereira, who tried to huddle from the drizzle beneath a friend's large umbrella. "This is my first time seeing a pope and this was an opportunity of a lifetime for me. I wasn't about to let it go because of a little rain."