Prophet Zakariya (AS) was sent to the people of Bani Israa'eel. He was a descendent of Prophet Ya'qoob (AS) and the uncle of Maulatana Maryam (AS). He was well liked and respected by his people because of his cheerful manner. He was in charge of the mosque of Bayt-ul-Muqaddas in Jerusalem , and preached the religion of Allah from there. He guided the people according to the rules laid down in the Taurat of Prophet Moosa (AS), who had been the last Rasool (a Prophet who has been given a Book) before him.
Prophet Zakariya (AS) had also been entrusted to look after Maulatana Maryam (AS), the mother of Prophet ‘Isaa (AS). He had provided her with a special chamber in Bayt-ul-Muqaddas. Although Maulatana Maryam (AS) remained in the chamber, busy praying Allah, Prophet Zakariya (AS) found that she always had fresh fruit in her room. Because he knew that she had no contact with any person, he wondered where the food came from. Maulatana Maryam (AS) informed him that Allah sent her the fruits every morning and evening, and it was a sign of His Grace. Prophet Zakariya (AS) realized that he was the guardian of a very special lady whom Allah had specially chosen for a great honor.
Prophet Zakariya (AS) had reached the age of 90 years and despite his cheerful and relaxed nature, he was sad that he had no son to succeed him. After hearing Maulatana Maryam (AS) he pondered on the limitless blessings that Allah bestows on His servants and wondered if he could be blessed with a son despite his old age. The same night he went to pray under the Arch of Sanctuary in Bayt-ul-Muqaddas, which was the special place of prayer to Allah. His prayers have been recorded in the Holy Qur'an as follows: (This is) a mention of the mercy of your Lord to His servant Zakariya. When he quietly called his Lord and said, "My Lord! My bones have become feeble, and my hair has turned white with age. Yet I have never been deprived in receiving from you the answer to my prayers. I am afraid of what my kinsmen will do after (my death) and my wife is barren. Lord, grant me a son who will be my heir and the heir of the family of Ya'qoob, and make him, O my Lord, one with whom You are well pleased." (Qur'an 19: 2-6)
..."Lord grant me by Your Grace, virtuous offspring, You hear all my prayers." When he was standing during prayer in the sanctuary, the angels called him saying, "Allah gives you the glad news of the birth of your son, Yahya, who will be testimony of the Word of Allah. (He will be) honorable and chaste and one of the righteous Prophets." (Qur'an 3:37, 38)
The prayers of Prophet Zakariya (AS) were answered and he was blessed with a handsome and virtuous son, Yahya (AS). Allah bestowed this child with wisdom and knowledge in his infancy and appointed him His Prophet and Messenger.