Zakariyya was the guardian of Maryam. Whenever he entered her prayer chamber he found provision with her, and she said it was from Allah (3:37). There and then he called on his Lord quietly for a righteous child, though he was old and his wife barren (19:2–6).
Allah gave him the glad tidings of a son, Yahya, and as a sign he did not speak to people for three nights except by gestures (19:7–11).