Zakariya (peace be upon him) was a prophet who cared for Maryam (Mary) and would find provision with her from Allah; when he asked her its source, she replied that it was from Allah, who provides without measure (3:37). This moved him to hope in Allah's power.
He called upon his Lord in private, a humble call, saying that his bones had grown weak and his head had turned white with age, yet he had never been unblessed in his prayer to Allah (19:3-4). He feared for the succession of his family and asked Allah for a righteous heir who would inherit prophethood, while his wife had been barren (19:5-6, 21:89).
Allah answered him with the glad tidings of a son named Yahya, a name given to no one before (19:7). Zakariya marvelled how he could have a son given his old age and his wife's barrenness, and Allah affirmed that this was easy for Him, who had created Zakariya himself from nothing (19:8-9).
As a sign, Zakariya was told he would not speak to people for three nights except by gesture, and he was commanded to glorify Allah morning and evening (19:10-11, 3:41). Allah describes Zakariya, Yahya, and their family as those who hastened to good deeds and called upon Him in hope and fear, humble before Him (21:90).