Praise be to Allah.
The basic principle is that the child should be called after his father, because the Prophet (peace and blessings of Allaah be upon him) said: “The child is for the bed and the adulterer gets nothing.” Narrated by al-Bukhaari, 2053; Muslim, 1457. What this hadeeth means is that the child should be named after the woman’s husband and the adulterer is to be condemned and gets nothing. (al-Fath, 12/36). This being named after the father is the child’s right and it is not permissible to transgress this right.
But if the husband is certain or thinks it most likely that the child is not his, then he may deny it, by means of the process of li’aan.
According to the majority of scholars of the four madhhabs, the child does not lose the right to be named after his father simply because the father rejects him, even if the wife admits that she committed adultery. Rather it is essential to carry out the li’aan process.
Li’aan is done as described in the verse in which Allaah says (interpretation of the meaning):
“And for those who accuse their wives, but have no witnesses except themselves, let the testimony of one of them be four testimonies (i.e. testifies four times) by Allaah that he is one of those who speak the truth.
And the fifth (testimony should be) the invoking of the Curse of Allaah on him if he be of those who tell a lie (against her).
But it shall avert the punishment (of stoning to death) from her, if she bears witness four times by Allaah, that he (her husband) is telling a lie.
And the fifth (testimony) should be that the Wrath of Allaah be upon her if he (her husband) speaks the truth”
So the husband should say four times, “I bear witness by Allaah that I am telling the truth in my accusation of her committing adultery” or “I bear witness by Allaah that you have committed adultery and this is not my child.” And the fifth time he adds: “May the curse of Allaah be upon me if I am telling a lie.”
And the woman – if she denies it – should say: “I bear witness by Allaah that he is lying, and that this child is his child.” And the fifth time she should pray that the wrath of Allaah should be upon her if he is telling the truth.
The li’aan should be done in the mosque in the presence of a number of Muslims, along with the judge or his deputy, or whoever they agree to appoint from among the Muslims.
Ibn ‘Abd al-Barr said: “Similarly the scholars did not disagree that li’aan can only be done in the mosque in which Jumu’ah prayers are held.” Fath al-Barr, 10/525.
When two spouses engage in li’aan, a number of things happen as a result:
1 – The husband is not subject to the hadd punishment for slander
2 – The wife is not subject to the hadd punishment for adultery.
3 – Husband and wife are divorced automatically, and this divorce is not dependent upon a judge’s ruling; rather divorce takes place as soon as the process of li’aan is completed, according to many scholars.
4 – They are forever forbidden to remarry.
5 – The child is not to be named after his father, rather he should be named after his mother. He and the husband cannot inherit from one another, and the husband is not obliged to spend on him because he is a stranger to him.
Undoubtedly abandoning a child in a Christian environment which will have an influence on him is a serious matter. Hence the husband should not engage in li’aan and disown the child unless he has proof and is certain that his wife has committed adultery.
Otherwise is it a serious sin and injustice towards his child, and exposing him to kufr and deviation.
And Allaah knows best.