
In 706 the Umayyad caliph Abd al-Malik had it rebuilt as a mosque.The christians were compensated in return. The mosque holds the shrine of prophet Yahya who is known as John the Baptist to the christians.
The mosque was restored in the 15th century and again in the 19th. In May of 2001, the pope visited the mosque. During his historic visit John Paul II became the first pontiff ever in history to enter a Muslim place of worship. Before he went inside, the pope took off his shoes and prayed in front of the tomb of John the Baptist.

It is believed that between the pillar (as shown in the picture) and another pillar is where Prophet Isa & Imam Mahdi (A.S) will re-appear from.
North of the mosque is the tomb of saladdin.
