By Philip Pullella
CZESTOCHOWA, Poland (Reuters) - Pope Francis prayed on Thursday before Poland's holiest icon - the Black Madonna of Jasna Gora - and said outdoor Mass for a congregation numbering in the tens of thousands, thanking Poles for holding on to their faith in difficult times.
Francis praised what he called "the contagious power of a genuine faith, passed down from family to family" in Poland, which is about 98 percent Catholic.
He said their faith had stayed strong in many situations throughout history. Poland is renowned for keep its Catholic flame burning during decades of Communist rule.
As the 79-year-old pope was blessing the altar at the start of the Mass, he tripped on a step but was helped up by aides and did not appear to be hurt. He continued the Mass and read his homily normally.
Francis suffers from sciatica, a medical condition in which pain sometimes shoots down the leg from the lower back.
The pope, whose main purpose in Poland is to preside at an international gathering of Catholic youth in Krakow, was driven to this city about 140 km (87 miles) away instead of taking a helicopter as planned because of the possibility of bad weather.
The shrine is home to the Black Madonna, a Byzantine icon from sometime between the sixth and ninth centuries and brought to Poland some 600 years ago. The icon is painted on wood and covered with silver and jewels.
The shrine has been a focal point in difficult periods of Polish history. Poles flocked there to pray when martial law was declared by the communist government in the early 1980s.
The late Pope John Paul II, who reigned for nearly three decades before he died in 2005, visited the shrine often during his trips to his homeland and donated the blood-stained white sash he was wearing on May 13, 1981, when he was shot in St. Peter's Square at the Vatican by Turkish gunman Mehmet Ali Agca.
Francis was due to return to Krakow on Thursday afternoon for formally open World Youth Day, a jamboree of young people around the world that has sometimes been dubbed the "Catholic Woodstock".
(Editing by Jeremy Gaunt.)