Commentary
In order to fulfill her vow, Sayyidah Maryam's mother took her to the Mosque of بیت المقدس Baitul-Maqdis and talked to the care-takers and worshippers at the Mosque, Sayyidna Zakariyya (علیہ السلام) being one of them, and. told them that she had vowed to dedicate the child in the service of God and therefore, she could not keep the child with her. She asked them to take her and keep her.
Sayyidna ` Imran (علیہ السلام) was the Imam of this Mosque. He had died during the pregnancy of Maryam's mother, otherwise he would have been the most deserving person to have taken charge of the child, being the father and the Imam of the Mosque. Therefore, every keeper and worshipper of the Mosque wished to take her in his custody. Sayyidna Zakariyya (علیہ السلام) pleaded his bid for custody by saying that his wife was Maryam's aunt and she being next to her mother certainly deserved to keep her. But, people did not agree to prefer him over the others. Finally, everybody agreed to draw lots, which turned out to be fairly strange as it would appear later. Here too, it was Sayyidna Zakariyya (علیہ السلام) who turned out to be the winner.
So, he got custody of Maryam. According to some reports, he employed a wet-nurse to have her suckled. Other reports say that she just did not need to be suckled. She grew up able to sit and walk and Sayyidna Zakariyya (علیہ السلام) put her in a good house adjacent to the Mosque. When he went out, he locked the house and opened it on re-turn. This has been stated briefly in the present verse.
Allah states that He has accepted Maryam as a result of her mother's vow and that He,
(made her grow in a good manner) meaning, made her conduct becoming, her mannerism delightful and He made her well liked among people. He also made her accompany the righteous people, so that she learned righteousness, knowledge and religion.
(And put her under the care of Zakariyya) meaning, Allah made Zakariyya her sponsor. Allah made Zakariyya Maryam's guardian for her benefit, so that she would learn from his tremendous knowledge and righteous conduct. He was the husband of her maternal aunt, as Ibn Ishaq and Ibn Jarir stated, or her brother-in-law, as mentioned in the Sahih,
(I saw John and `Isa, who are maternal cousins.)
We should state that in general terms, what Ibn Ishaq said is plausible, and in this case, Maryam was under the care of her maternal aunt. The Two Sahihs recorded that the Messenger of Allah decided that `Amarah, the daughter of Hamzah, be raised by her maternal aunt, the wife of Ja`far bin Abi Talib, saying,
(The maternal aunt is just like the mother.)
Allah then emphasizes Maryam's honor and virtue at the place of worship she attended,
(Every time he entered the Mihrab to (visit) her, he found her supplied with sustenance.)
Mujahid, `Ikrimah, Sa`id bin Jubayr, Abu Ash-Sha`tha, Ibrahim An-Nakha`i, Ad-Dahhak, Qatadah, Ar-Rabi` bin Anas, `Atiyah Al-`Awfi and As-Suddi said, "He would find with her the fruits of the summer during winter, and the fruits of the winter during summer." When Zakariyya would see this; d
(He said: "O Maryam! From where have you gotten this") meaning, where did you get these fruits from
(She said, "This is from Allah." Verily, Allah provides sustenance to whom He wills, without limit.)