Pope John Paul II has issued a plea to end conflict and human suffering around the world as he made an emotional return to his homeland of Poland.
Consecrating a basilica in the neighborhood where he was once a factory worker under German occupation, the 82-year-old pontiff said human beings called out for God's mercy through their pain and troubles.
"In every continent, from the depth of human suffering, a cry for mercy seems to rise up," the ailing pope said in the homily at his first mass during what could be his last visit to the country of his birth.
The church commemorates a mystic nun, Faustina Kowalska, who became Poland's first female saint when John Paul canonised her two years ago.
He recalled walking by the site in his wooden shoes every day as a young man in the city, where he lived through the Nazis and later battled against the post-war communist regime.
"Who could imagine that that man in clogs would one day consecrate the Basilica of the Divine Mercy?" he said.
Nearly 20,000 worshippers loudly applauded during the ceremony, at which he focused on the themes of mercy and forgiveness and made an impassioned call to end all wars and conflict.
The long-running conflict in the Middle East has been a special preoccupation of John Paul II.
"Where hatred and the thirst for revenge dominate, where war brings suffering and death to the innocent, there the grace of mercy is needed in order to settle human minds and to bring about peace," he said.
The pope appeared to be happy to be back in Krakow, where he served as archbishop before becoming head of the Roman Catholic Church in 1978, and officials said he was in relatively good health despite his battle with Parkinson's disease and arthritis.
The pope stood while being wheeled on a cart into the church, and then sat through the consecration ceremony except to walk up and anoint the altar.
His trip is largely a long excursion into his past, and tomorrow he will visit the graves of his parents. He will also celebrate mass in the cathedral where he said his first mass as a priest in November 1946.
Hundreds of thousands in this 80 percent Catholic country have turned out in joyous celebrations on the streets, waving Polish and Vatican flags, to welcome their favorite son home.
Up to two million are expected to attend an open-air mass tomorrow, with four million overall to attend services and ceremonies in honor of the immensely popular pope.
AFP