Surah Aal-i-Imraan

3:36

فَلَمَّا وَضَعَتْهَا قَالَتْ رَبِّ إِنِّى وَضَعْتُهَآ أُنثَىٰ وَٱللَّهُ أَعْلَمُ بِمَا وَضَعَتْ وَلَيْسَ ٱلذَّكَرُ كَٱلْأُنثَىٰ ۖ وَإِنِّى سَمَّيْتُهَا مَرْيَمَ وَإِنِّىٓ أُعِيذُهَا بِكَ وَذُرِّيَّتَهَا مِنَ ٱلشَّيْطَٰنِ ٱلرَّجِيمِ

But when she delivered her, she said, "My Lord, I have delivered a female." And Allah was most knowing of what she delivered, "And the male is not like the female. And I have named her Mary, and I seek refuge for her in You and [for] her descendants from Satan, the expelled [from the mercy of Allah]."

Tafsir 3:36

When she reached the end of her pregnancy and gave birth she was astonished – as she had hoped for a boy – and she said, ‘O Lord, I have given birth to a girl’. Allah knows what she gave birth to. Of course, a girl does not have the same strength and form as a boy that she had hoped for. She said, ‘I have named her Mary and I ask for Your mercy in protecting her and her children from the rejected Satan’.