CZESTOCHOWA, Poland - Pope Francis blessed hundreds of thousands of faithful Thursday at a shrine in Poland, paying tribute to a beloved native son, St. John Paul II, honouring the countless "ordinary yet remarkable" Poles who defiantly clung to their faith during Soviet-bloc communism and establishing this pontiff's drawing power in a country where being Catholic is often equated with being Polish.

Francis, who had never set foot in Eastern Europe before this week's five-day pilgrimage to Poland, 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.

Pilgrimages to Jasna Gora, often by faithful trekking long distances, are part of many Polish Catholics' identity and upbringing.

Polish church officials said as many as 600,000 people flocked to the outdoor Mass at the monastery. In the evening, local church organizers in Krakow said another 500,000 faithful, young people from all around the world cheered Francis at a pep rally on a meadow in the southern city.

Vatican officials and police declined to offer any estimates.

During the pep rally, people sang and danced to lively tunes, waving flags from places as different as Tennessee and Turkey. In a gesture to the Argentine-born, tango-loving Francis, Poles devised a tango number with Polish lyrics.

"John Paul is no more, but Francis means a continuation of this great love for God that our Polish pope has given us," Marcin Zbik, a student from the northwestern town of Police told The Associated Press.

During the morning Mass, a woman went into labour and was taken to a hospital where her daughter was delivered, said the town hall in Czestochowa, the town hosting the shrine.

At the start of the Jasna Gora Mass, the 79-year-old pope tripped and fell as he walked to the altar, but he rose quickly with help from several priests and showed no ill effects.

"There were no consequences, the pope didn't suffer, he didn't hurt himself, there was no need for a medical checkup," Vatican spokesman the Rev, Federico Lombardi said.

The Mass marked this year's 1,050th anniversary of Poland's acceptance of the Roman Catholic faith, a move that eventually set it apart culturally from Orthodox nations in the region. Polish President Andrzej Duda and other political leaders sat in front rows at 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," Francis said in his homily, speaking in Italian and pausing for a priest to translate his words into Polish.

"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 aren't Christians. At his evening pep rally, he told the young people he was confident they would "join the adventure of building bridges and knocking down walls, fences."

Walls and barbed-wire fences have sprung up in eastern and central Europe to keep those fleeing wars and hunger in the Middle East, Asia and Africa from penetrating into the heart of the European continent.

After lunch in Krakow, Francis joined some disabled young people aboard an electric tram, painted in the Vatican's yellow and white colours, for the ride to the park where the youth rally was held.

Security was tight following a string of attacks in Europe, and people were warned over loudspeakers not to leave their bags unattended.

-----

Vanessa Gera in Warsaw contributed.