In a Tweet commemorating International Migrants’ Day Tuesday, Pope Francis compared migrants of today with the cold welcome of the Christ child in Bethlehem.

“Jesus knows well the pain of not being welcomed,” the pope said. “May our hearts not be closed as were the houses in Bethlehem.”

Jesus knows well the pain of not being welcomed. May our hearts not be closed as were the houses in Bethlehem. #Internationalmigrantsday — Pope Francis (@Pontifex) December 18, 2018

A number of attentive social media users were quick to correct the pontiff on the historical record, pointing out that Joseph and Mary were not immigrants in Bethlehem but were, in fact, returning to Joseph’s hometown of Bethlehem to be counted and taxed as Roman subjects.

Moreover, others noted, the houses in Bethlehem were not “closed” but rather were full because of the large number of citizens returning to their ancestral home for the imperial census.

That being said, the pope has made immigration a central plank of his papal platform, encouraging nations to be more inviting to migrants, whether legal or illegal, while insisting that a failure to welcome migrants is rooted in selfishness and fueled by “populist rhetoric.”

Francis has also been a vocal supporter of the U.N.’s Global Compact for Safe, Orderly and Regular Migration (GCM) approved in Marrakesh last week.

The GCM provides “a framework for the whole international community,” the pope told the crowds gathered in Saint Peter’s Square Sunday, asking for prayers that this accord will lead all nations to work with “responsibility, solidarity, and compassion toward those who, for various reasons, have left their country.”

Earlier this month, the Vatican’s department for Migration and Refugees issued a statement praising the GCM, saying that the Holy See “will join many other governments of the world to celebrate the adoption of this pact, the first international agreement on migration at the global level.”

Also last week, Italian counter-terrorism forces arrested a Somali migrant with ties to the Islamic State, who plotted the bombing of Christian churches in Italy this Christmas, starting with Saint Peter’s Basilica in the Vatican.

In an operation involving Italian and international law enforcement agencies, police arrested 20-year-old Mohsin Ibrahim Omar in the southern Italian port city of Bari last Thursday.

In intercepted communications, Omar spoke of striking the Vatican on Christmas day or shortly thereafter, when there would be “the pope and so many people” and the basilica would be “full, full, full.”

Italian security measures are currently at the highest levels, especially in train stations, airports, places of worship, historic monuments, and crowded places.

There will also be some 30,000 law enforcement officers on trains during Christmas until January 6.

“The level of attention is at its highest at possibly sensitive targets and Christmas markets,” said interior minister Matteo Salvini, while emphasizing that the presence of security officials is not meant to disturb people’s normal activities.

Follow Thomas D. Williams on Twitter Follow @tdwilliamsrome