His appeal came at the end of World Youth Day, a weeklong event being held in southern Poland this year that draws young Catholics from around the world every two to three years for a spiritual pep rally.
The youth gathering was Francis' main focus during his pilgrimage to Poland, but over five days in this deeply Catholic nation he also prayed at the former Nazi Auschwitz death camp and implored God to keep away a devastating wave of terrorism now hitting the world. He also met with Poland's political and church leaders.
Many of the faithful had camped out overnight after an evening of entertainment and prayer with the pope in the same field Saturday night that drew 1.6 million people, according World Youth Day organizers.
Today's faithful numbered at least in the hundreds of thousands. The Rev. Federico Lombardi, a Vatican spokesman, referred to an estimate by Polish authorities of 1.5 million today's closing Mass.
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-centered or small-minded," Francis told his flock, many of them in their late teens, 20s or 30s.
After over 1 million people arrived on Europe's southern shores last year, some nations on the continent, notably in central and eastern Europe, hastily built fences to keep the refugees out.
Poland has been among the EU countries that have refused to take in many Muslim refugees, saying it has already welcomed hundreds of thousands of Ukrainian immigrants.
