Pope Francis has likened the journey of Mary and Joseph to Bethlehem to the migrations of millions of people today who are forced to leave homelands for a better life, or just for survival, and he expressed hope that no one will feel “there is no room for them on this Earth”.

Francis celebrated Christmas vigil mass on Sunday in the splendour of St Peter’s Basilica, telling the faithful that the “simple story” of Jesus’ birth in a manger changed “our history forever. Everything that night became a source of hope.”

Noting that Mary and Joseph arrived in a land “where there was no place for them”, Francis drew parallels with today.

“So many other footsteps are hidden in the footsteps of Joseph and Mary,” he said in his homily. “We see the tracks of entire families forced to set out in our own day. We see the tracks of millions of persons who do not choose to go away but, driven from their land, leave behind their dear ones.”

Francis has made concern for economic migrants, war refugees and others on society’s margins a central plank of his papacy. He said God is present in “the unwelcomed visitor, often unrecognisable, who walks through our cities and our neighbourhoods, who travels on our buses and knocks on our door”. That perception of God should develop into “new forms of relationship, in which none have to feel that there is no room for them on this Earth”, he said.

“Christmas is a time for turning the power of fear into the power of charity,” Francis said.

At midday Monday, tradition calls for Francis to deliver the Christmas Day message “urbi et orbi” – Latin for “to the city and to the world” – from the central loggia of the basilica overlooking St Peter’s Square.