May a couple choose the sex of their child?
Yes. Medical help to have a child of a particular sex is permitted, as long as the child comes from husband and wife. Whether it succeeds is in the end decided by God.
Many couples have only daughters or only sons and long for a child of the other sex. There is nothing wrong with this wish. For centuries people have sought a doctor’s advice for it, and in the Muslim world this has not been forbidden. That today’s methods are more scientific does not change the principle. Progress has made many things easier, and it is not forbidden to make use of it.
Only what goes against the clear commandments of the Holy Qur’an is forbidden. The sperm of another man may not be used. Nor may another woman carry the child for the couple as a surrogate mother. The child must come from husband and wife. Within these limits a couple may use modern help as much as they wish.
One thing remains important. Whoever uses the laws of nature that God created takes nothing out of God’s hands. The verses above say that God grants daughters and sons to whom He wills. Even with the best method it sometimes does not work if God does not will it. The idea that a child can be ordered to one’s wishes is a mistake.
So a couple should use the means available and pray at the same time. And whichever child comes, daughter or son, it is a gift from God and deserves the same love.