Pope John Paul II yesterday became the first pontiff ever to visit a mosque during his pilgrimage to Greece, Syria and Malta, retracing the steps of St. Paul.

The 80-year-old pope called for forgiveness and understanding between Christians and Muslims as he spoke to worshippers in the Great Umayyad Mosque in Damascus.

“For all the times that Muslims and Christians have offended one another, we need to seek forgiveness from the Almighty and to offer each other forgiveness,” the Roman Catholic leader said.

“Better mutual understanding will surely lead . . . to a new way of presenting our two religions, not in opposition, as has happened too often in the past, but in partnership for the good of the human family.”

The mosque in Damascus’ old walled city was a Christian church that was converted after Arabs conquered the city nearly 1,500 years ago.

The head of St. John the Baptist is said to be buried inside.

The pope took advantage of the unique location to denounce those who would wage war in the name of religion.

“It is crucial for the young to be taught the ways of respect and understanding, so they will not be led to misuse religion itself to promote or justify hatred and violence,” he said.

“Violence destroys the image of the Creator, and should never be considered as the fruit of religious conviction.”

But John Paul sidestepped a controversy over remarks by Syrian President Bashar Assad and Mufti Ahmad Kaftaro, Syria’s highest religious leader, which were widely interpreted as anti-Semitic and anti-Israel.

The pontiff’s spokesman said the pope “would absolutely not intervene” in the flap, adding that the Holy See’s position against anti-Semitism is well known.