Kraków (Poland) (AFP) - Pope Francis said on Wednesday the world was at war but argued that religion was not the cause, as he arrived in Poland a day after jihadists murdered a Catholic priest in France.

In his first speech after touching down in the city of Krakow, the pontiff said the way to "overcome fear" was to welcome people fleeing conflict and hardship.

Opening doors to migrants demands "great wisdom and compassion" he said, chastising a rightwing government that has refused to share the burden during Europe's worst refugee crisis since World War II.

"We must not be afraid to say the truth, the world is at war because it has lost peace," the pontiff told journalists on the flight out from Rome.

"When I speak of war I speak of wars over interests, money, resources, not religion. All religions want peace, it's the others who want war."

The brutal killing of the elderly priest during mass in France on Tuesday, in an attack claimed by the Islamic State group, has cast a shadow over Francis's trip to headline World Youth Day, a gathering of young Catholics from across the globe.

"This holy priest who died in the moment of offering prayers for the church is one (victim). But how many Christians, innocents, children?" Francis said.

- Polish stance softening? -

"The word we hear a lot is insecurity, but the real word is war. The world has been in a fragmented war for some time. There was the one in 14, one in 39-45 and now this," he said referring to World War I and II.

A string of terror attacks targeting civilians in Europe appears to have dampened turnout for the World Youth Day festival, a week-long faith extravaganza dubbed "the Catholic Woodstock".

Flag-waving crowds of youngsters nonetheless turned out in force to cheer on the pope as he sped to the Wawel Royal Castle in his open-top popemobile, defying security fears.

"I saw him! He was just five metres (yards) away, it's incredible to see a man like him in person and not just on TV," Polish teenager Karina Borowicz told AFP.

Story continues

Around 200,000 pilgrims attended the opening mass on Tuesday, according to Krakow police, while organisers had expected around half a million.

The French priest's murder has also complicated Francis's aim to champion migrants, while emboldening Polish Prime Minister Beata Szydlo and her right-wing government who have refused to take in refugees for security reasons.

But Polish President Andrzej Duda appeared to signal a softening of Warsaw's stance following closed-door talks with Francis.

"If someone wants to come here, especially if they are a refugee, fleeing war to save their life, we will of course accept them," he told reporters.

Poland is on high security alert, deploying over 40,000 personnel for the visit. Authorities also charged an Iraqi man on Monday with possessing trace amounts of explosive material.

- 'Love, peace, prayer' -

"World Youth Day is a great celebration and we hope the attack in France will not ruin it," said Marcin Przeciszewski, head of Catholic Information Agency KAI, as worshippers gathered Tuesday to pray for the fallen French priest.

"The best answer to violence is love, peace and prayer," said French pilgrim Pierre Darme.

The pope, 79, will likely have to work overtime to win hearts and minds in the homeland of Polish pope John Paul II.

The charismatic saint, hailed for his role in toppling Communism, sponsored conservative Catholic movements -- a legacy which sits uncomfortably with the Argentine pontiff's attempts to nurture a more flexible, compassionate Church.

"Polish Catholics probably aren't going to be welcoming the pope they really want, but given their current social and political situation, they may be getting exactly the one they need," Vatican expert John Allen wrote on the Cruxnow.com website.

Christopher Lamb in Catholic weekly newspaper The Tablet said many of Poland's bishops are "at odds with the direction of his papacy," particularly Francis's push to open church doors to traditional "sinners" such as single mothers and divorced people who have remarried.

An off-the-record meeting with Polish Church leaders will give the pontiff a chance to call on dissident bishops to reconsider their attitudes.

At the heart of the visit will be a meeting with Holocaust survivors at the former Nazi death camp Auschwitz, where Francis will pray for the camp's 1.1 million mostly Jewish victims, before the five-day trip winds up with the customary papal vigil and mass.