There have been many "great expressions of solidarity" over the centuries, even though there have been social tensions, too, the pope said.

"Unfortunately, today's context of economic crisis prompts the emergence of an attitude of closure and not welcome. In some parts of the world walls and barriers are appearing," he said.

"Sometimes it seems that the silent work of many men and women who, in different ways, strive to help and assist refugees and migrants is overshadowed by the noise of others who give voice to an instinctive selfishness," he said.

"Closure is not a solution, rather it ends up encouraging criminal trafficking," he said.

The pope asked that people never be tempted by the "trap" of closing in on oneself, never become indifferent to people's needs and never become focused only on one's own personal interests.

The more a person opens up to others, he said, the more one's life is enriched, the more society opens itself up to peace and people recover their full dignity.

Looking up from his written remarks, the pope told the more than 25,000 people gathered in the square about a "little story" that happened a few days ago in Rome.

He said a woman had asked a man who was barefoot and looked lost if he needed help, and the man said he wanted to go to St. Peter's Basilica and walk through the Holy Door. The woman wondered how the man would ever get there without shoes, so she hailed a taxi, the pope said.

At first the cab driver did not want to let the man inside because "he smelled," but he eventually gave in. During the 10-minute ride, the woman asked the man about his life, and he talked about his trials of being a refugee escaping war and hunger. The pope said the women knew "the pain of a migrant" because of her Armenian roots.

When they arrived at their destination, "the woman opened her bag to pay the cab driver, but the driver, who at first didn't want this immigrant to get in because he smelled, told the woman, 'No, ma'am, I'm the one who must pay because you made me hear a story that changed my heart.'"

Pope Francis said, "When we do something like this, at first we refuse because it makes us feel a bit uncomfortable" or awkward, but in the end, carrying out an act of mercy or assistance makes the soul smell sweet and "makes us change. Think about this story and let us think about what we can do for refugees."

The pope also recalled the "stupendous figure" of St. Frances Xavier Cabrini, who founded the Missionary Sisters of the Sacred Heart of Jesus, and who emigrated to New York from Italy in 1889 to minister to fellow immigrants, opening schools, orphanages and hospitals for the poor. She became the first U.S. citizen to be declared a saint.

"It is urgent today as is in the past" for all Christians to be assisting immigrants and refugees, he said. "It is a task that involves everyone, without exception."

- - -

Follow Glatz on Twitter: @CarolGlatz.