VATICAN CITY — Pope Francis decried as worrisome those who whip up fear of migrants for political gain as he urged people Friday to view global migration as a peace-building opportunity and not as a threat.

His message, which was issued in eight languages, was issued by the Vatican in preparation for the Catholic church’s annual World Peace Day, which it marks on Jan. 1.

Without citing any nation, Francis said many countries where migrants and refugees have gone have seen “the spread of rhetoric decrying the risks posed to national security or the high cost of welcoming new arrivals.”

Francis added: “Those who, for what may be political reasons, foment fear of migrants instead of building peace are sowing violence, racial discrimination and xenophobia, which are matters of great concern for all those concerned for the safety of every human being.”

Anti-migrant politics have been gaining currency in many places in Europe, including in the Vatican’s backyard in Italy, where populist and right-wing parties are keen on making gains in national elections next year.

Francis noted that all indications point to global migration continuing for the future.

“Some consider this a threat,” he said. “For my part, I ask you to view it with confidence as an opportunity to build peace.”

Francis expressed his “heartfelt hope” that in 2018, the United Nations would “draft and approve two Global Compacts, one for safe, orderly and regular migration and the other for refugees.”

He also suggested that less wealthy countries could take in more refugees if the international community provided the necessary funds.

After noting that there are 250 million migrants worldwide, including some 22.5 million refugees, Francis said government leaders “have a clear responsibility toward their own communities, whose legitimate rights and harmonious development they must ensure.”

However, that he said, could be done while still welcoming, protecting and integrating migrants into their societies.