Prophet Zakariya (Zachariah) was an illustrious Prophet of the Israelites. He was one of the descendants of Prophet Sulaiman (peace be upon him). The name of his wife was al-Yashbi' who belonged to the family of Prophet Harun (peace be upon him). The Prophet Zakariya (peace be upon him) was the patron of Mary, the mother of Prophet Isa (peace be upon him). He was the trustee of Hekal. He worked as a carpenter and earned his livelihood.
The Prophet Zakariya (peace be upon him) kept the torch of Mosaic law burning. He used to pray devotionally and preach zealously. His wife and he were the symbols of piety and righteousness. Most of his kinsmen lacked in spirit of true faith. As they were seduced, they were inclined to doing evil deeds. They were going out of the right path. The Prophet Zakariya (peace be upon him) was much anxious about this state of affairs. He had no offspring and there was no suitable person to hold the office of priesthood of Hekal after his death. He was desirous of having a son to become his good successor. He did not long for a son to satisfy a mere human desire for one's progeny. He wanted to have a son to maintain the warmth of religious activities. One night he stood in prayer in his sanctuary and prayed to Allah to bless him with a good son. He was conscious that he was in an advanced age and his wife was barren and unable to raise any issue. He had full faith in Allah Who possesses power to do whatever He wills. He came to know through his prophetic insight that Allah would grant his request. He would be blessed with a good son to act as his heir who could guide the people aright.
God in His infinite mercy removed the defect of his wife's barrenness so that she might become mother. She gave birth to Prophet Yahya. (peace be upon him) who was destined to be honourable, chaste, and a prophet from among the righteous. The Prophet Zakariya (peace be upon him) felt satisfied as his son grew up and became a symbol of piety. He was graced with wisdom, obedience and asceticism. The Prophet Zakariya (peace be upon him) continued preaching the religion of Allah even in old age.
Prophet John or Yahya is also honored as a prophet in Islam as Yaḥyā ibn Zakarīyā (Arabic: يحيى بن زكريا), or "John, son of Zechariah". He is believed by Muslims to have been a witness to the word of God, and a prophet who would herald the coming of Jesus. His father Zechariah was also an Islamic prophet. 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. It is said that he met John and Jesus in the second heaven, where Muhammad greeted his two 'brothers' before ascending with archangel Gabriel to the third heaven. John's story was also told to the Abyssinian king during the Muslim refugees' Migration to Abyssinia. According to the Qur'an, John was one on whom God sent peace on the day that he was born and the day that he died.
John is also honored highly in Sufism as well as Islamic mysticism, primarily because of the Qur'an's description of John's chastity and kindness. Sufis have frequently applied commentaries on the passages on John in the Qur'an, primarily concerning the God-given gift of "Wisdom" which he acquired in youth as well as his parallels with Jesus. Although several phrases used to describe John and Jesus are virtually identical in the Qur'an, the manner in which they are expressed is different. The Prophet Yahya (peace be upon him) was the precursor of Prophet Isa (Jesus Christ). He was his cousin and contemporary as well. His fidelity to his mission as a preacher soon deprived him of his liberty and subsequently his life.