Pope Francis has prayed that people all over the world would end 2019 "in peace, peace in their hearts".

He also prayed that families will mark New Year by "communicating with one another".

Reciting the Angelus prayer on Sunday, the feast of the Holy Family, Pope Francis entrusted to Mary, Queen of the Family, all the families of the world, "especially those experiencing suffering or distress, and we invoke upon them her maternal protection."

The Pope also offered special prayers "for the victims of the horrible terrorist attack yesterday in Mogadishu, Somalia, where more than 70 people were killed in the explosion of a car bomb. I am close to all their families and those who mourn their deaths."

He led the crowd in St Peter's Square in reciting a Hail Mary for the victims and their loved ones as the death toll continued to rise.

The day's reading from the Gospel of St Matthew recounted how an angel appeared to Joseph in a dream, telling him to flee to Egypt with Mary and Jesus because Herod wanted to kill the baby.

"In that way, the Holy Family is in solidarity with all the families in the world obliged to go into exile, in solidarity with all those forced to abandon their lands because of repression, violence and war," said Pope Francis.

The holiness of the Holy Family is a gift of God, he said, but at the same time it is a result of their "free and responsible adherence to God's plan".

Jesus, Mary and Joseph, he said, "represent a choral response to the will of the Father. The three members of this family helped each other discover God's plan."

"They prayed, worked, communicated," the Pope said. "And I ask you: In your family do you know how to communicate, or is yours like those with youngsters around the table, each one with their cellphone chatting?"

When they are all on their phones playing, watching something or texting others, he said, there is no communication.

"We must reclaim dialogue within families; parents, children, grandparents and brothers and sisters need to communicate with each other," the Pope said. "This is your task for today, the feast of the Holy Family."

Pope Francis also prayed that the Holy Family would be a model for parents and children learning "to support each other in adhering to the Gospel, which is the foundation of holiness in the family".

