VATICAN CITY — Pope Francis on Saturday said an "epidemic of animosity" against people of other races or religions was hurting the weakest in society, and he called for 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 color 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 Brexit and the US presidential campaign, and which have spawned hundreds of hate crimes since the election, according to the Southern Poverty Law Center.

The US Justice Department said on Friday it was investigating reports of intimidation and harassment in schools, churches, and elsewhere since the election.

In February, Francis spoke out against wall building, in remarks widely seen as a criticism of the then-GOP candidate's oft-repeated calls to build a wall between the US and Mexico. That's not the only possible interpretation of his remarks, noted The Christian Science Monitor's Peter Grier at the time:

We’re talking about the pope here, after all. He might not be superficial.

In fact Pope Francis demonstrated a light touch and the heart of a teacher with his comments, writes Kathryn Jean Lopez in the right-leaning National Review.

Here are (some of) the pope’s exact words: “A person who thinks only about building walls, wherever they may be, and not building bridges, is not Christian. This is not in the Gospel.”

...

On Friday, the Vatican also made it clear it was not interested in engaging in a war of words. A spokesman for the pope said his comments needed to be taken in context, and they were "in no way a personal attack or an indication on how to vote."

Francis's recent remarks were directed at all sides of the growing polarizations showing up in politics around the world. One of the new cardinals, Archbishop Blase Cupich of Chicago, told Reuters the pope was "very much aware of the fact that if that (animosity) is not checked, it is very contagious and it can spread quickly, it can be like a wildfire."

In his homily, the pope said the Church itself was not immune to "a virus of polarization and animosity," an apparent reference to a public challenge from four conservative cardinals who accused him of sowing confusion on moral issues.

In the "consistory" ceremony in St. Peter's Basilica, Francis appointed 17 new cardinals, 13 of them under 80 and thus eligible to succeed him.

After the ceremony, 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.

The new cardinal-electors under 80, eligible to take part in a papal conclave, come from Italy, the Central African Republic, Spain, the United States, Brazil, Bangladesh, Venezuela, Belgium, Mauritius, Mexico, and Papua New Guinea.

Those over 80 come from Italy, Malaysia, Lesotho, and Albania.

Francis has now named 44 cardinal-electors, slightly more than a third of the total of 120 allowed by Church law.

It was the pope's third "consistory" since his election in 2013 as the first non-European pontiff in 1,300 years, and he has used each occasion to show support for the Church in far-flung places or where Catholics are suffering.