Hannah was the mother of Bibi Maryam (‘a). We have an extraordinary example of her in Surah Aali-Imran. A righteous woman, Bibi Hannah dedicated a child in her womb to the service of Allah, Subhanahu wa Ta’ala. She thought she would deliver a boy. When she delivered, it was a girl. She named her Maryam and still dedicated her to the service of Allah, praying to Allah to keep Maryam and her progeny protected from Shaytan. This is how the Qur’an reveals her Du’a:
إِذۡ قَالَتِ ٱمۡرَأَتُ عِمۡرَٲنَ رَبِّ إِنِّى نَذَرۡتُ لَكَ مَا فِى بَطۡنِى مُحَرَّرً۬ا فَتَقَبَّلۡ مِنِّىٓ إِنَّكَ أَنتَ ٱلسَّمِيعُ ٱلۡعَلِيم
“Behold! A woman of Imran said: "O my Lord! I do dedicate into Thee what is in my womb for Thy special service so accept this of me! For Thou hearest and knowest all things." (3:35).
And when she delivered and saw it was a female she delivered; she did the following Du’a:
رَبِّ إِنِّي وَضَعْتُها أُنْثى وَاللَّهُ أَعْلَمُ بِما وَضَعْتْ وَلَيْس الذَّكَرَ كَالْأُنْثى وَإِنِّي سَمَّيْتُها مَرْيَمَ وَإِنِّي أُعيذُها بِكَ وَذُرِّيَّتَها مِنَ الشَّيْطانِ الرَّجيمِ
“O my Rabb! I have brought forth a female – Allah knew fully well what she had brought forth – the male is not as a female, and behold, I have named her Maryam, and behold, I commend her to Your protection, and also her offspring from Shaytan, the stoned.” (3:36).