Fertilization of wife’s egg outside the uterus
Question

If the one who will carry a pregnancy – i.e., the one in whose womb the man’s sperm or the gamete will be implanted – is the wife of the man who produces the sperm, and that sperm is placed directly in her womb by medical means, noting that the man is unable to place his sperm there in the natural manner for some reason, what is the ruling on this case?
Praise be to Allah.Concerning the situation mentioned in the question, there has been a great deal of discussion amongst the scholars of the current age. Some say that it is permissible, some say that it is forbidden, and some say that we cannot comment either way. Among those who said that we cannot comment either way was Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him). The researcher thought that the view of the majority of modern scholars is most likely to be correct, but subject to certain conditions, namely: 
(a)urgent need, i.e., when it is not possible to achieve pregnancy by natural means
(b)the doctor dealing with the case should think it most likely that no harm will be caused by doing this procedure
(c)there should be no room for sperm (lit. lineages) to be mixed
The ruling on the case mentioned is the same as the ruling on a case where sperm is taken from a man and an egg from his wife, then the egg is fertilized in a test tube and returned to the uterus. The most correct view is that this is permissible, subject to the conditions mentioned above.