Egypt’s Dar Al-Ifta received a question on its official website: Is it permissible to choose the gender of a baby? And does this contradict God’s divine will?
The institution responded that there is no religious objection to gender selection through medical intervention, provided there is a valid reason — such as preventing hereditary diseases linked to one gender, or when a family wishes to have a child of a different gender than their existing children. The process must, however, be carried out individually, under the supervision of qualified doctors, and without harm to the mother or fetus.
Dar Al-Ifta emphasized that gender selection does not represent an act of defiance against God’s decree. It is rather an example of taking permissible means, as all causes and their effects exist by God’s creation and command. Allah says: “And you do not will unless Allah wills” (Al-Insan: 30).
The ruling was compared to the prophetic permission for “coitus interruptus” (ʿazl), which the Prophet ﷺ allowed while affirming that what God has destined will still occur.
The fatwa listed key conditions for permissibility:
No harm should result for the mother or the child.
The procedure must be overseen by trusted medical professionals.
It must be applied to individual cases, not as a societal practice, to preserve the natural balance between genders.
In conclusion, Dar Al-Ifta stated that medical gender selection is not a rejection of divine will, but rather part of using lawful means within the scope of God’s creation and decree.



