Pope Francis has refused to describe Islam as "terrorist", because it is "not fair and not true".
Francis was asked by reporters on the papal plane returning to Rome from Poland 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.
The jamboree, meant to infuse young Catholics with fresh passion for their religion, was the main reason Francis came to Poland on the trip, which also took him to the former Auschwitz Nazi death camp, where he prayed in silence and reflected on what he called "so much cruelty".
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.
Flying back to Rome, he was asked by reporters what he thought about Poland and its welcome to him.
Referring to the enormous crowds he drew day after day in a country where St Pope John Paul II was born, Francis joked that "Poland was invaded, this time by young people" - apparently referring to Germany's 1930 invasion of Poland that triggered the Second World War.
Pope Francis also explained why he took a tumble during an outdoor Mass in Czestochowa, Poland's most popular Catholic shrine.
He said of the July 28 fall, which happened while he was sprinkling incense around the altar at the Jasna Gora monastery: "I was watching (an image of) the Madonna, and I forgot the step.
"I let myself fall and this saved me. Because if I tried to resist it, I would have gotten hurt."