Zechariah prayed to Allah, but then wondered, "My Lord! How could I have a son when old age has overtaken me already and my wife is barren?" He said, "So it will be, Allah does everything according to His Laws." The infertility in his wife was cured (21:90).