Pope Francis said an "epidemic of animosity" against people of other races or religions was hurting the weakest in society, striking a note of caution against the rise of populist nationalism.
Little more than a week after Donald Trump was elected the next US president, buoying anti-immigrant parties in Europe and elsewhere, the pope noted "how quickly those among us with the status of a stranger, an immigrant or a refugee become a threat, take on the status of an enemy..."
"An enemy because they come from a distant country or have different customs. An enemy because of the colour of their skin, their language or their social class. An enemy because they think differently or even have a different faith," he said at a ceremony to induct new cardinals.
While not naming any country, Francis appeared to refer to anti-immigrant and anti-Muslim attitudes that surfaced during the US campaign and since the election.
The US Justice Department said yesterday it was investigating reports of intimidation and harassment in schools, churches and elsewhere since the election.
In the "consistory" ceremony in St Peter's Basilica, Francis appointed 17 new cardinals, 13 of them under 80 and thus still eligible to succeed him.
One of the cardinals appointed today is Irish. Kevin Farrell was born in Drimnagh, Dublin, and worked in Texas in the US until October of this year when he moved to the Vatican to undertake a new role.
He now leads a new Vatican department called the Dicastery for Laity, the Family and Life. It is part of the Curia which is the Vatican governance system.
In his homily, the pope said the Church itself was not immune to "a virus of polarisation and animosity", an apparent reference to a public challenge by four conservative cardinals, who accused him of sowing confusion on moral issues.
Afterwards, the pope and the new cardinals boarded two buses and visited former pope Benedict, who has been living in a house in the Vatican gardens since resigning in 2013.
Naming new cardinals allows a pontiff to put his stamp on the future of the 1.2 billion-member church.
The appointees come from 15 countries and many are progressives like the pope. Three come from the United States.