إِذْ قَالَتِ ٱمْرَأَتُ عِمْرَٰنَ رَبِّ إِنِّى نَذَرْتُ لَكَ مَا فِى بَطْنِى مُحَرَّرًا فَتَقَبَّلْ مِنِّىٓ ۖ إِنَّكَ أَنتَ ٱلسَّمِيعُ ٱلْعَلِيمُ ﴿35﴾ فَلَمَّا وَضَعَتْهَا قَالَتْ رَبِّ إِنِّى وَضَعْتُهَآ أُنثَىٰ وَٱللَّهُ أَعْلَمُ بِمَا وَضَعَتْ وَلَيْسَ ٱلذَّكَرُ كَٱلْأُنثَىٰ ۖ وَإِنِّى سَمَّيْتُهَا مَرْيَمَ وَإِنِّىٓ أُعِيذُهَا بِكَ وَذُرِّيَّتَهَا مِنَ ٱلشَّيْطَـٰنِ ٱلرَّجِيمِ ﴿36﴾
35 (Remember) when the wife of 'Imran said: My Lord! I have vowed unto Thee that which is in my belly as a consecrated (offering). Accept it from me. Lo! Thou, only Thou, art the Hearer, the Knower! 36 And when she was delivered she said: My Lord! Lo! I am delivered of a female - Allah knew best of what she was delivered - the male is not as the female; and lo! I have named her Mary, and lo! I crave Thy protection for her and for her offspring from Satan the outcast.
Ali ’Imran 3:35–36 on Quran.com · Pickthall’s translation
Surah Aal Imran is named after the family of Imran. According to the historical books, Imran was a religious figure of his time. When his wife was expecting, she made a promise to Allah: My Lord, I have vowed to You what is in my womb, dedicated to Your service, so accept it from me (Aal Imran 3:35). At that time only a son could be dedicated to serve in the ministry, so she was hoping for a boy. Then she gave birth to a girl, and named her Maryam (Aal Imran 3:36).
The first lesson is that Allah judges by intention. Maryam’s mother wanted a son to give to Allah’s service. What she got was a daughter. On paper, her plan had failed. But her intention was pure, and that daughter grew into a woman of whom the angels said, Allah has chosen you and purified you, and chosen you above the women of the world (Aal Imran 3:42). Allah looked at what she meant, not only at how things turned out.
The second lesson is for every parent. The first wish for your children should be that they serve the deen of Allah. If you are expecting, you can make that intention now. If your children are already here, it is not too late. You can say: Ya Allah, You gave me this child, and from today I want my son or my daughter to serve Your deen. Make that your goal: that they hold to Islam, live by it, die upon it, and serve it.
This does not mean your child must sit in the masjid for the rest of their life. Serving the deen means serving the cause of Allah with the talents Allah gave them. Each child can serve Allah through what they are good at. If you want ideas for bringing faith into family life from the start, the kids corner is a good place to begin.
The third lesson is not to be bound by what the world says. Maryam’s mother was living by the rule of her day: only a son could serve. Allah showed that a daughter could be raised higher than anyone. The world has its own rules, and they change all the time. What is normal today becomes strange tomorrow, and what is strange today becomes normal. So do not worry too much about what the world thinks. Care about what pleases Allah and His Messenger.
The fourth lesson ties the whole family together: nothing is impossible for Allah. The same story goes on to Zakariyya, Maryam’s guardian, who found fruit with her out of season and asked Allah for a child in his old age, and was given Yahya. A mother whose plan seemed to fail, an old man whose chance seemed to have passed, and Allah answered both. You can read the whole passage on the Aal Imran mind map.