Is it permissible to find out the gender of the baby prior to it being born. For e.g, during the last scan week 31 of pregnancy?
In the name of Allah, the most Beneficent, the most Merciful.
Allah (SWA) in the Holy Qur’an has said:
“Surely, it is Allah with whom rests the knowledge of the Hour; and He sends down the rain and he knows what is in the wombs. And no one knows what he will earn tomorrow and no one knows in which land he will die. Surely, Allah is All Knowing, All Aware.” (Surah Luqmaan v.34)
The above verses prove that in the absolute knowledge of the unseen there are five things the knowledge of which is not given to any prophet even through wahy (divine revelation) or any pious saint through ilham (inspiration). However, there are countless events where the pious saints have given news of rain, pregnancy or someone doing a deed or not doing a deed in the future or someone’s exact place of death. Furthermore, with advanced medical equipment the gender of an unborn child in the mother’s womb can be deduced.
This raises the question: How then could these five things remain exclusive to the Divine Knowledge of Allah (SWA)?
Knowledge of the unseen is knowledge without the mediation of a physical cause. If these things are received by the blessed prophets through wahy, by the pious saints through ilhaam and by astrologers through their calculations is not knowledge of the unseen. Instead, these are ‘news’ of the unseen. Furthermore, this knowledge is through a medium with the probabilities of error or false perception. (Maariful Quran p.58-p.59 v.7)
With regards to your question, the procedure carried out to deduce the gender of an unborn child would not be against the above verse, thus it will be permissible.
Only Allah Knows Best
Mohammed Tosir Miah
Darul Ifta Birmingham