“May we not wait for our neighbors to be good before we do good to them, for the Church to be perfect before we love her, for others to respect us before we serve them,” Francis said in the homily.

To lead a life as a gift to others “is the best way to change the world,” and to give thanks to God for the way in which he loves everybody, even “the worst of us,” the pontiff said.

“How often do we think that God is good if we are good and punishes us if we are bad. Yet that is not how he is. For all our sins, he continues to love us,” he added.

It was a message that chimed with a key theme of Francis’ papacy, namely that the Catholic Church should focus less on the enforcement of its rules, and more on reaching out to those who stray from them.

One way in which the pope has put this into practice is by softening a ban on communion for remarried divorcees, a move that has antagonized traditionalists within the church.

For Francis, who was elected in 2013, it was the seventh Christmas Eve as pope. As he entered St Peter’s, shortly before 9:30 p.m. local time, the lights were dimmed.

The pope held a ferula, a metal rod topped by a cross, and was preceded by a procession of golden-robed cardinals. As he reached the altar, the lights went up again.

Before opening Mass, Francis lifted a cloth covering a baby Jesus figure, and 12 children from Italy, Japan, Venezuela, Kenya, Uganda, the Philippines and Iraq laid flowers by the shrine.

At the end of the 90-minute service, the pontiff picked up the doll-size Jesus figure and, escorted by the children, took it to a nativity scene inside the basilica.

The pope’s Christmas-time engagements were set to continue Wednesday with the traditional “Urbi et Orbi” (to the city and to the world) noon message from the central balcony of St Peter’s Basilica.

The Urbi et Orbi, which offers blessings and a pardon for sins, is delivered at Easter, Christmas and after the election of a new pope.

Pontiffs usually use the occasion to plead for world peace.