"The faith that your parents instilled in you will help you move forward," the pope told the immigrants Jan. 19 at the Basilica of the Sacred Heart of Jesus near Rome's central train station.
The parish offers about 400 immigrants material aid, Italian lessons and discussion groups. The pope said the groups are important because they give immigrants an opportunity to talk about the homesickness and the frightening and painful experiences many of them went through as they made their way to Italy.
Acknowledging pain can help heal it, the pope said, so that it does not make them bitter.
Faith, too, has a role, he said. Prayer and Scripture reading can bring solace, he said: "you who are Christian, with the Bible, and you who are Muslim, with the Quran."
Earlier in the day, reciting the Angelus at the Vatican, Pope Francis called attention to the church's celebration of World Day of Migrants and Refugees.
He told migrants and refugees in St. Peter's Square, "You are close to the heart of the church, because the church is a people journeying toward the kingdom of God."
"I hope you can live in peace in the countries that have welcomed you, safeguarding the values of your cultures," he told them.
The pope also asked those gathered in the square to pray for refugees and he thanked those who assist them, particularly those who defend migrants and refugees from the "merchants of human flesh who want to enslave" those seeking a better life.
During his evening visit to Sacred Heart parish, Pope Francis spent almost four hours with the thousands of people who braved the rain to see him. The basilica was packed for Mass, which he celebrated after meeting immigrants, young families, the parish youth group and a group of homeless people who receive assistance from parishioners. He also heard five parishioners' confessions.
The pope told the young people that, knowing God loves them, they should take risks and make some noise in the parish, taking care not to end up like some "people who are just 40 or 50 years old and have hearts more prepared for a funeral than a feast."
Pope Francis said that as archbishop of Buenos Aires he met with a "group of young people who wanted to renew the church: they were all serious.... Then at Mass, they all had their hands clenched, rigid. At a certain point I thought I was with a bunch of statues, not people."
"A young person who doesn't smile, who doesn't make a bit of noise, has grown old too quickly," he said.
In his brief homily at the Mass, Pope Francis focused on a line from John's Gospel (1: 29): "John the Baptist saw Jesus coming toward him and said, 'Behold, the Lamb of God, who takes away the sin of the world.'"
"But how can a lamb, so weak, a weak little lamb take away so many sins, so much evil?" the pope asked. "With love and with his meekness."
Pope Francis said some might think their sins are too big to be carried away "even with a truck," but Jesus can handle them.
Jesus "came for this reason: to forgive, to bring peace to the world, but first to hearts. Maybe each of us has a torment in our heart, an area of darkness, maybe we feel sad because of something we've done," the pope said. "He came to take away all of this. He will give us peace. He will forgive everything.”