Pope Francis has praised Poland's first pope, the late St John Paul II, on his five-day visit to the country as he visited a shrine cherished by Poles.
Francis also honoured the countless "ordinary yet remarkable people" who held firm to their Catholic faith throughout adversity in the former Communist nation.
The Argentine pontiff, who has not been to Eastern Europe before, gazed in apparent awe for several minutes as he studied the Jasna Gora monastery shrine's iconic image of the so-called Black Madonna.
The faces of Mary and Baby Jesus in the icon - an object of veneration starting in the 14th century - are blackened by centuries of varnish and candle soot.
A silver screen was raised slowly and dramatically to unveil the image as Francis stood silently and then prayed.
Then, during an outdoor Mass in the southern city of Czestochowa before a crowd that organisers put at 600,000, Francis lavished praise on Poland's legacy of steadfast devotion as he urged Poles to hold fast to their faith.
As the 79-year-old pope walked up to the altar he tripped and fell, but quickly rose, helped by priests, and went on to deliver a long homily.
Church officials said Francis was not hurt and did not complain afterwards.
The Mass was held in celebration of this year's 1,050th anniversary of Poland's acceptance of Roman Catholicism.
The baptism of a medieval king in 966 put Poland on course to be part of the Latin-speaking Western world, setting it apart culturally from Orthodox nations in the region.
Polish president Andrzej Duda and other political leaders were among those attending the Mass.
"Our minds turn to so many sons and daughters of your own people, like the martyrs who made the defenceless power of the Gospel shine forth, like those ordinary yet remarkable people who bore witness to the Lord's love amid great trials," said Francis in his homily.
Jesus Christ encourages us to lift up our eyes and to dream lofty dreams. During these days of the WYD, Jesus wants to enter our homes.— Pope Francis (@Pontifex) July 28, 2016
He spoke in Italian and paused for a priest to translate his words into Polish.
He cited two beloved Polish saints, praising those "meek and powerful heralds of mercy who were Sts John Paul II and Faustina.
"Through these channels of his love, the Lord has granted priceless gifts to the whole Church and to all mankind."
Francis recalled the far less famous soldiers of the faith in Poland.
"Your own history, shaped by the Gospel, the cross and fidelity to the church, has seen the contagious power of a genuine faith, passed down from family to family, from fathers to sons and above all from mothers and grandmothers, whom we need so much to thank," he said.
Francis urged Poles to stay united even as their nation is divided over the issue of refugees and migrants, especially those who are not Christians.
He prayed that Poles would have "the desire to leave behind all past wrongs and wounds, and to build fellowship for all, without ever yielding to the temptation to withdraw or to domineer."
The right-wing government which came to power in Poland last year has faced international suspicion that it has eroded past democratic gains, and critics say there has been a rise in xenophobic sentiment.
There was a last-minute change to the pope's travel plans due to concern about bad weather.
Francis opted to take a car instead of a military helicopter to Czestochowa, 100 kilometres from Krakow, but returned to Krakow by helicopter.
Francis' visit to Poland centres on a Catholic youth jamboree that has drawn hundreds of thousands of participants.
Francis rode in an electric tram through the heart of Krakow with disabled young people after resting at the residence of the archbishop of Krakow.
The gesture underlined his mission to fight climate change and encourage more humanity for the disadvantaged.
He had ridden public transport to inspire humility among church hierarchy as archbishop of Buenos Aires in his native Argentina.
The words Tram del Papa - Italian for "the pope's tram" - went in place of the usual destination indicator on the tram.
Francis rode it to Blonia, a park where he was joining tens of thousands of young Catholics joining in World Youth Day, a global gathering which runs until Sunday.
The mood ahead of his arrival was joyful, with people singing and dancing to lively tunes as they waved flags from places as different as Tennessee and Turkey.
Security was tight following a string of attacks in Europe, and people were warned over loudspeakers not to leave their bags unattended.