According to Christian tradition, (legend had it that) Saint John's head was buried there. Ibn al-Faqih relays the story that during the construction of the mosque, workers found a cave-chapel which had a box containing the head of St. John the Baptist, or Yaḥyā ibn Zakarīyā in Islam. Upon learning of that and examining it, al-Walid I ordered the head buried under a specific pillar in the mosque that was later inlaid with marble.
John (Yahya) is honored as a prophet in Islam as Yahya ibn Zakariya. He is believed by Muslims to have been a witness to the word of God, & a prophet who would herald the coming of Jesus. Islamic tradition maintains that John was one of the prophets whom Muhammad met on the night of the Mi'raj, his ascension through the Seven Heavens. The son of Zechariah is a figure of prime importance in the history of Christianity, for he was the Precursor who prepared the way for Christ. John’s life, wholly dedicated to God, was crowned by martyrdom.