KRAKOW, Poland — Pope Francis celebrated Mass on Thursday at one of Poland’s most renowned shrines, urging Catholics to embrace “the humble love that brings freedom” and to shun the lust for wealth and power.

“To be attracted by power, by grandeur, by appearances, is tragically human,” Francis said at the 14th-century monastery of Jasna Gora, a pilgrimage site in the city of Czestochowa known for its painting of the Virgin Mary. “It is a great temptation that tries to insinuate itself everywhere. But to give oneself to others, eliminating distances, dwelling in littleness and living the reality of one’s everyday life: This is exquisitely divine.”

Later in the day, before an international crowd of 600,000 gathered in Krakow for the World Youth Day celebration, the pope urged people to welcome migrants and refugees, a stance resisted by the Polish government.

“A merciful heart is able to be a place of refuge for those who are without a home or have lost their home,” Francis said. “It is able to build a home and a family for those forced to emigrate; it knows the meaning of tenderness and compassion. A merciful heart can share its bread with the hungry and welcome refugees and migrants.”