Pope Francis has refused to describe Islam as "terrorist", because it is "not fair and not true".
On the papal plane returning to Rome from Poland, reporters asked Francis why he never used the word "Islam" when condemning killings by extremists like that of an elderly priest in France last week.
The Pope said "it's not right to identify Islam with violence", adding that every religion had its "little group of fundamentalists".
He said that if he spoke of violent Islam, he would have to speak of violent Catholicism, since Catholics kill too.
Referring to the Islamic State group, Francis, 79, said it "presents itself with its violent identity card, but it's not Islam".
During his five-day pilgrimage in southern Poland he prayed privately in a church that God protect people from the "devastating wave" of terrorism in many parts of the world.
Francis told young people who flocked by the hundreds of thousands that they needed to "believe in a new humanity" stronger than evil and warned against concluding that one religion was more violent than others.
Organisers of the Catholic jamboree known as World Youth Day estimated 1.5 million youths attended his Mass at a meadow near Krakow, many having camped out in sleeping bags from a vigil service of prayer, singing and dance performances the previous evening.
Extremist violence was on his mind when he set out last week, the day after terrorists rushed into a church in the French countryside and murdered the elderly priest there, slitting his throat, as he was celebrating Mass.
The Pope used his several encounters with the young pilgrims - from mega-gatherings to a private lunch with only a dozen people from five continents - to encourage a new generation to work for peace, reconciliation and justice.
God, said Francis in his final homily of the pilgrimage, "demands of us real courage, the courage to be more powerful than evil, by loving everyone, even our enemies".
"People may judge you to be dreamers, because you believe in a new humanity, one that rejects hatred between peoples, one that refuses to see borders as barriers and can cherish its own traditions without being self-centred or small-minded," Francis said.
Earlier in his pilgrimage Francis expressed dismay that many people and places were not welcoming enough to refugees or those fleeing poverty in their homelands.
This pilgrimage marked the first time the native Argentine pope sent foot in eastern Europe.