Pope Francis has urged Poland's leaders to 'overcome fear' and welcome desperate migrants fleeing conflict and hardship.

In his first speech in the city of Krakow, at the start of his five-day visit to the country, the Pontiff said opening doors to migrants requires 'great wisdom and compassion'.

Francis chastised the right-wing Law and Justice government for refusing to share the burden during Europe's worst refugee crisis since World War II.

The Pontiff, pictured with Polish President Andrzej Duda (right), said opening doors to migrants requires 'great wisdom and compassion'

Francis chastised the government for refusing to share the burden during Europe's worst refugee crisis since World War II

Fears run deep in the strongly Catholic nation that Muslim refugees could endanger its security and erode its Christian traditions.

But the Pope, noting that many Poles have emigrated, spoke of the need to understand the reasons that caused migrants to leave.

He said: 'We must not be afraid to say the truth, the world is at war because it has lost peace.

'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.'

He added: 'Needed is a spirit of readiness to welcome those fleeing from wars and hunger, and solidarity with those deprived of their fundamental rights, including the right to profess one's faith in freedom and safety.'

Francis's trip to headline World Youth Day, a gathering of young Catholics from across the globe, was overshadowed by the brutal killing of 85-year-old Catholic priest Jacques Hamel in Normandy, France, on Tuesday.

The Pope, noting that many Poles have emigrated, spoke of the need to understand the reasons that caused migrants to leave

The Pope urged Poland's leaders to 'overcome fear' and welcome desperate migrants fleeing conflict and hardship

Speaking about the attack, the Pope said: 'This holy priest who died in the moment of offering prayers for the church is one (victim). But how many Christians, innocents, children?'

Despite security fear, thousands of flag-waving youngsters turned out to cheer on Francis as he visited the Wawel Royal Castle in his open-top popemobile.

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

But Francis, 79, will likely have to work overtime to win the majority of hearts and minds in the homeland of Polish pope John Paul II, who is hailed for his role in toppling Communism.

Vatican expert John Allen wrote on the Cruxnow.com website: '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.'

Pope Francis attends a welcoming ceremony with Polish President Andrzej Duda (right) at Wawel Royal Castle

Francis's trip to headline World Youth Day was overshadowed by the brutal killing of 85-year-old Catholic priest Jacques Hamel (pictured)

Christopher Lamb in Catholic weekly newspaper The Tablet added that many of Poland's bishops are 'at odds with the direction of his papacy.'

Polish President Andrzej Duda did appear to signal a softening of Warsaw's stance following closed-door talks with the Pope, who made his feelings clear.

He said: 'If someone wants to come here, especially if they are a refugee, fleeing war to save their life, we will of course accept them.'

Poland is currently on high security alert, deploying over 40,000 personnel for the Pontiff's visit.

Authorities also charged an Iraqi man on Monday with possessing trace amounts of explosive material.