Pope Francis has warned Europeans against creating new divisions and building trenches, the former a reference to growing nationalism across the continent and the latter a reference to the carnage wrought by World War I.

He pointed to the two world wars that ravaged the Continent during the last century, and described peace as a "fragile good," when he spoke near the end of the two-day Catholic Church in the European Union (COMECE) conference on Europe's future that was held at the New Synod Hall in the Vatican City.

"Particular and nationalist agendas risk thwarting the courageous dreams of the founders of Europe," he said.

Pope Francis never mentioned the Catalan separatist movement or the British vote to leave the European Union, but he frequently referenced solidarity, teamwork and shared sacrifice.

Watch video 00:36 Steinmeier meets Pope Francis at Vatican

"A European Union that, in facing its crises, fails to recover a sense of being a single community that sustains and assists its members - and not just a collection of small interest groups - would miss out not only on one of the greatest challenges of its history, but also on one of the greatest opportunities for its own future," the pope said.

He called on Europe to be a continent of peacemakers, and said it's not sufficient to sidestep inner tensions. It also requires a love of truth, pursuit of justice and creativity, he said.

Call to accept Muslim immigrants

Now is "not the time to build trenches," Francis said, referring to the battles of World War I.

The pontiff also lamented Europe's declining birth rate. The continent, he said, was suffering from "a period of dramatic sterility. Not only because Europe has fewer children, and all too many were denied the right to be born, but also because there has been a failure to pass on the material and cultural tools that young people need to face the future."

The pope also appeared to warn against the dangers posed by anti-immigrant parties. "Extremist and populist groups are finding fertile ground in many countries," he said. "They make protest the heart of their political message, without offering the alternative of a constructive political project."

Read more: Pope Francis asks German president about refugees and AfD

The two-day conference brought together invited representatives from the church, politics and society.

Read more: Merkel hails positive talks with Pope Francis

Dozens of participants attended the conference, including the European Parliament President Antonio Tajani, vice president of the European Commission, Frans Timmerans and an array of religious leaders.

bik/jm (Reuters, KNA, AP, AFP)